mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 15:10:28 +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
|
||||
|
||||
senderJID := message.Info.SenderJid
|
||||
// if len(senderJid) == 0 {
|
||||
// // TODO workaround till https://github.com/Rhymen/go-whatsapp/issues/86 resolved
|
||||
// senderJid = *message.Info.Source.Participant
|
||||
// }
|
||||
if len(senderJID) == 0 {
|
||||
// TODO workaround till https://github.com/Rhymen/go-whatsapp/issues/86 resolved
|
||||
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
|
||||
senderName := b.getSenderName(senderJID)
|
||||
|
Loading…
Reference in New Issue
Block a user