Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 573ce9a886905f1a4de4a3e5b7ef16a95dec98f2 Author: Wim <wim@42.be> Date: Sun Mar 13 20:42:07 2022 +0000 Fix channel in video/audio/image/document handling (whatsapp) diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go index 8433601..1216c69 100644 --- a/bridge/whatsapp/handlers.go +++ b/bridge/whatsapp/handlers.go @@ -1247 +1247 @@ 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{}), @@ -1877 +1877 @@ 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{}), @@ -2447 +2447 @@ 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{}), @@ -3017 +3017 @@ 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{}),