diff options
author | Wim <wim@42.be> | 2022-03-13 18:05:46 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2022-03-20 14:57:48 +0100 |
commit | 21c4e56d1631008a5a3cff012a36859dfb1ccb4d (patch) | |
tree | 8e4eccea43191fe626f16be51d4b63c477506f74 /bridge/whatsapp/whatsapp.go | |
parent | 5356b3856a75de3316ea3c7f1c36e2928a58120a (diff) | |
download | matterbridge-msglm-21c4e56d1631008a5a3cff012a36859dfb1ccb4d.tar.gz matterbridge-msglm-21c4e56d1631008a5a3cff012a36859dfb1ccb4d.tar.bz2 matterbridge-msglm-21c4e56d1631008a5a3cff012a36859dfb1ccb4d.zip |
Use Conversation instead of ExtendedTextMessage (whatsapp)
Diffstat (limited to 'bridge/whatsapp/whatsapp.go')
-rw-r--r-- | bridge/whatsapp/whatsapp.go | 16 |
1 files changed, 10 insertions, 6 deletions
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 |