From fffa29c2f359ef59b4d7dd6d118d80ac7427606d Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 13 Mar 2022 20:42:07 +0100 Subject: Fix channel in video/audio/image/document handling (whatsapp) --- bridge/whatsapp/handlers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bridge/whatsapp') 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{}), -- cgit v1.2.3