5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 23:41:35 +00:00

Add username for images from WhatsApp (#1232)

This commit is contained in:
Dellle 2020-09-26 21:32:57 +02:00 committed by GitHub
parent 06eb89b05b
commit a42e488e58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)