From 21c4e56d1631008a5a3cff012a36859dfb1ccb4d Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 13 Mar 2022 18:05:46 +0100 Subject: Use Conversation instead of ExtendedTextMessage (whatsapp) --- bridge/whatsapp/whatsapp.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'bridge/whatsapp') diff --git a/bridge/whatsapp/whatsapp.go b/bridge/whatsapp/whatsapp.go index ee18f457..7ee4045f 100644 --- a/bridge/whatsapp/whatsapp.go +++ b/bridge/whatsapp/whatsapp.go @@ -318,17 +318,21 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) { } } - var message proto.Message - text := msg.Username + msg.Text - message.ExtendedTextMessage = &proto.ExtendedTextMessage{ - Text: &text, - } + var message proto.Message - b.Log.Debugf("=> Sending %#v", msg) + message.Conversation = &text + + /* + message.ExtendedTextMessage = &proto.ExtendedTextMessage{ + Text: &text, + } + */ ID := whatsmeow.GenerateMessageID() + b.Log.Debugf("=> Sending %#v to %#v with ID %s", message, groupJID, ID) + _, err := b.wc.SendMessage(groupJID, ID, &message) return ID, err -- cgit v1.2.3