mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-12 21:50:26 +00:00
Add username for images from WhatsApp (#1232)
This commit is contained in:
parent
06eb89b05b
commit
a42e488e58
@ -143,10 +143,12 @@ func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) {
|
|||||||
groupJID := message.Info.RemoteJid
|
groupJID := message.Info.RemoteJid
|
||||||
|
|
||||||
senderJID := message.Info.SenderJid
|
senderJID := message.Info.SenderJid
|
||||||
// if len(senderJid) == 0 {
|
if len(senderJID) == 0 {
|
||||||
// // TODO workaround till https://github.com/Rhymen/go-whatsapp/issues/86 resolved
|
// TODO workaround till https://github.com/Rhymen/go-whatsapp/issues/86 resolved
|
||||||
// senderJid = *message.Info.Source.Participant
|
if message.Info.Source != nil && message.Info.Source.Participant != nil {
|
||||||
// }
|
senderJID = *message.Info.Source.Participant
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// translate sender's Jid to the nicest username we can get
|
// translate sender's Jid to the nicest username we can get
|
||||||
senderName := b.getSenderName(senderJID)
|
senderName := b.getSenderName(senderJID)
|
||||||
|
Loading…
Reference in New Issue
Block a user