Skip to content

Commit

Permalink
Add support to send a message as a reply of another
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Moreira committed Jul 2, 2024
1 parent 8e20a52 commit e52f6a2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/com/whatsapp/api/domain/messages/Context.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.whatsapp.api.domain.messages;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Object that allow messages to be replied
*
*
* @see <a href="https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#replies">Replies</a>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Context {

Check warning on line 13 in src/main/java/com/whatsapp/api/domain/messages/Context.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/whatsapp/api/domain/messages/Context.java#L13

Added line #L13 was not covered by tests

@JsonProperty("message_id")
private String messageId;

}
2 changes: 2 additions & 0 deletions src/main/java/com/whatsapp/api/domain/messages/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class Message {
private final String messagingProduct = "whatsapp";
@JsonProperty("recipient_type")
private final String recipientType = "individual";
@JsonProperty("context")
private Context context;
/**
* The Interactive message.
*/
Expand Down

0 comments on commit e52f6a2

Please sign in to comment.