Skip to content

GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.

feat(send): support reply_message_id on stickers (#867)

Alejandro3ecef4d8e651
diff --git a/docs/openapi.yaml b/docs/openapi.yaml
index e4e6673d..f9face5f 100644
--- a/docs/openapi.yaml
+++ b/docs/openapi.yaml
@@ -1533,6 +1533,10 @@ paths:
type: integer
example: 86400
description: "Disappearing message duration in seconds. Allowed values: 0 (no expiry), 86400 (24h), 604800 (7d), 7776000 (90d)."
+ reply_message_id:
+ type: string
+ example: 3EB089B9D6ADD58153C561
+ description: Message ID that you want reply
is_forwarded:
type: boolean
example: false
diff --git a/src/domains/send/sticker.go b/src/domains/send/sticker.go
index 22ab4260..35b66f08 100644
--- a/src/domains/send/sticker.go
+++ b/src/domains/send/sticker.go
@@ -4,6 +4,7 @@ import "mime/multipart"
type StickerRequest struct {
BaseRequest
- Sticker *multipart.FileHeader `json:"sticker" form:"sticker"`
- StickerURL *string `json:"sticker_url" form:"sticker_url"`
+ ReplyMessageID *string `json:"reply_message_id" form:"reply_message_id"`
+ Sticker *multipart.FileHeader `json:"sticker" form:"sticker"`
+ StickerURL *string `json:"sticker_url" form:"sticker_url"`
}
diff --git a/src/usecase/send.go b/src/usecase/send.go
index eff6c9e8..ce53c412 100644
--- a/src/usecase/send.go
+++ b/src/usecase/send.go
@@ -1850,6 +1850,8 @@ func (service serviceSend) SendSticker(ctx context.Context, request domainSend.S
msg.StickerMessage.ContextInfo.Expiration = proto.Uint32(uint32(*request.BaseRequest.Duration))
}
+ msg.StickerMessage.ContextInfo = service.mergeReplyContext(ctx, msg.StickerMessage.ContextInfo, request.ReplyMessageID)
+
content := "🎨 Animated Sticker"
// Send the animated sticker message
@@ -2014,6 +2016,8 @@ func (service serviceSend) SendSticker(ctx context.Context, request domainSend.S
msg.StickerMessage.ContextInfo.Expiration = proto.Uint32(uint32(*request.BaseRequest.Duration))
}
+ msg.StickerMessage.ContextInfo = service.mergeReplyContext(ctx, msg.StickerMessage.ContextInfo, request.ReplyMessageID)
+
content := "🎨 Sticker"
// Send the sticker message