summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-03-13 18:05:46 +0100
committerWim <wim@42.be>2022-03-20 14:57:48 +0100
commit21c4e56d1631008a5a3cff012a36859dfb1ccb4d (patch)
tree8e4eccea43191fe626f16be51d4b63c477506f74 /bridge
parent5356b3856a75de3316ea3c7f1c36e2928a58120a (diff)
downloadmatterbridge-msglm-21c4e56d1631008a5a3cff012a36859dfb1ccb4d.tar.gz
matterbridge-msglm-21c4e56d1631008a5a3cff012a36859dfb1ccb4d.tar.bz2
matterbridge-msglm-21c4e56d1631008a5a3cff012a36859dfb1ccb4d.zip
Use Conversation instead of ExtendedTextMessage (whatsapp)
Diffstat (limited to 'bridge')
-rw-r--r--bridge/whatsapp/whatsapp.go16
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