5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-10 05:20:25 +00:00

Fix channel in video/audio/image/document handling (whatsapp)

This commit is contained in:
Wim 2022-03-13 20:42:07 +01:00
parent 4da1444ffc
commit fffa29c2f3

View File

@ -124,7 +124,7 @@ func (b *Bwhatsapp) handleImageMessage(msg *events.Message) {
rmsg := config.Message{ rmsg := config.Message{
UserID: senderJID.String(), UserID: senderJID.String(),
Username: senderName, Username: senderName,
Channel: ci.GetRemoteJid(), Channel: msg.Info.Chat.String(),
Account: b.Account, Account: b.Account,
Protocol: b.Protocol, Protocol: b.Protocol,
Extra: make(map[string][]interface{}), Extra: make(map[string][]interface{}),
@ -187,7 +187,7 @@ func (b *Bwhatsapp) handleVideoMessage(msg *events.Message) {
rmsg := config.Message{ rmsg := config.Message{
UserID: senderJID.String(), UserID: senderJID.String(),
Username: senderName, Username: senderName,
Channel: ci.GetRemoteJid(), Channel: msg.Info.Chat.String(),
Account: b.Account, Account: b.Account,
Protocol: b.Protocol, Protocol: b.Protocol,
Extra: make(map[string][]interface{}), Extra: make(map[string][]interface{}),
@ -244,7 +244,7 @@ func (b *Bwhatsapp) handleAudioMessage(msg *events.Message) {
rmsg := config.Message{ rmsg := config.Message{
UserID: senderJID.String(), UserID: senderJID.String(),
Username: senderName, Username: senderName,
Channel: ci.GetRemoteJid(), Channel: msg.Info.Chat.String(),
Account: b.Account, Account: b.Account,
Protocol: b.Protocol, Protocol: b.Protocol,
Extra: make(map[string][]interface{}), Extra: make(map[string][]interface{}),
@ -301,7 +301,7 @@ func (b *Bwhatsapp) handleDocumentMessage(msg *events.Message) {
rmsg := config.Message{ rmsg := config.Message{
UserID: senderJID.String(), UserID: senderJID.String(),
Username: senderName, Username: senderName,
Channel: ci.GetRemoteJid(), Channel: msg.Info.Chat.String(),
Account: b.Account, Account: b.Account,
Protocol: b.Protocol, Protocol: b.Protocol,
Extra: make(map[string][]interface{}), Extra: make(map[string][]interface{}),