Browse Source

Also show message when the message includes a mention

When the message includes a mention GetConversation() returns an empty string, the message sits in ExtendedTextMessage then.
To see who is mentioned, we also return the context
pull/72/head
Tim Vandecasteele 3 years ago
parent
commit
493c27a429
  1. 3
      src/pkg/whatsapp/whatsapp.go

3
src/pkg/whatsapp/whatsapp.go

@ -269,7 +269,8 @@ func sendAutoReplyWebhook(evt *events.Message) error {
body := map[string]any{
"message_id": evt.Info.ID,
"from": evt.Info.SourceString(),
"message": evt.Message.GetConversation(),
"message": evt.Message.GetConversation() + evt.Message.ExtendedTextMessage.GetText(),
"context": evt.Message.ExtendedTextMessage.GetContextInfo(),
"image": imageMedia,
"video": videoMedia,
"audio": audioMedia,

Loading…
Cancel
Save