Skip to content

Commit e52f6a2

Browse files
author
Thiago Moreira
committed
Add support to send a message as a reply of another
1 parent 8e20a52 commit e52f6a2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.whatsapp.api.domain.messages;
2+
3+
import com.fasterxml.jackson.annotation.JsonInclude;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
6+
/**
7+
* Object that allow messages to be replied
8+
*
9+
*
10+
* @see <a href="https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#replies">Replies</a>
11+
*/
12+
@JsonInclude(JsonInclude.Include.NON_NULL)
13+
public class Context {
14+
15+
@JsonProperty("message_id")
16+
private String messageId;
17+
18+
}

src/main/java/com/whatsapp/api/domain/messages/Message.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public class Message {
1717
private final String messagingProduct = "whatsapp";
1818
@JsonProperty("recipient_type")
1919
private final String recipientType = "individual";
20+
@JsonProperty("context")
21+
private Context context;
2022
/**
2123
* The Interactive message.
2224
*/

0 commit comments

Comments
 (0)