summaryrefslogtreecommitdiffstats
path: root/bridge/whatsapp/handlers.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-03-13 20:42:07 +0100
committerWim <wim@42.be>2022-03-20 14:57:48 +0100
commitfffa29c2f359ef59b4d7dd6d118d80ac7427606d (patch)
tree95f10e6f4a453355a2f0ac385e470ce41c2be9cb /bridge/whatsapp/handlers.go
parent4da1444ffc5b55b01af29d9bbe56f36e25f0907c (diff)
downloadmatterbridge-msglm-fffa29c2f359ef59b4d7dd6d118d80ac7427606d.tar.gz
matterbridge-msglm-fffa29c2f359ef59b4d7dd6d118d80ac7427606d.tar.bz2
matterbridge-msglm-fffa29c2f359ef59b4d7dd6d118d80ac7427606d.zip
Fix channel in video/audio/image/document handling (whatsapp)
Diffstat (limited to 'bridge/whatsapp/handlers.go')
-rw-r--r--bridge/whatsapp/handlers.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go
index 84336012..1216c693 100644
--- a/bridge/whatsapp/handlers.go
+++ b/bridge/whatsapp/handlers.go
@@ -124,7 +124,7 @@ func (b *Bwhatsapp) handleImageMessage(msg *events.Message) {
rmsg := config.Message{
UserID: senderJID.String(),
Username: senderName,
- Channel: ci.GetRemoteJid(),
+ Channel: msg.Info.Chat.String(),
Account: b.Account,
Protocol: b.Protocol,
Extra: make(map[string][]interface{}),
@@ -187,7 +187,7 @@ func (b *Bwhatsapp) handleVideoMessage(msg *events.Message) {
rmsg := config.Message{
UserID: senderJID.String(),
Username: senderName,
- Channel: ci.GetRemoteJid(),
+ Channel: msg.Info.Chat.String(),
Account: b.Account,
Protocol: b.Protocol,
Extra: make(map[string][]interface{}),
@@ -244,7 +244,7 @@ func (b *Bwhatsapp) handleAudioMessage(msg *events.Message) {
rmsg := config.Message{
UserID: senderJID.String(),
Username: senderName,
- Channel: ci.GetRemoteJid(),
+ Channel: msg.Info.Chat.String(),
Account: b.Account,
Protocol: b.Protocol,
Extra: make(map[string][]interface{}),
@@ -301,7 +301,7 @@ func (b *Bwhatsapp) handleDocumentMessage(msg *events.Message) {
rmsg := config.Message{
UserID: senderJID.String(),
Username: senderName,
- Channel: ci.GetRemoteJid(),
+ Channel: msg.Info.Chat.String(),
Account: b.Account,
Protocol: b.Protocol,
Extra: make(map[string][]interface{}),