5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 18:25:40 +00:00

Handle panic in whatsapp. Fixes #1180 (#1184)

This commit is contained in:
Wim 2020-07-30 23:55:31 +02:00 committed by GitHub
parent 1e94b716fb
commit ebd2073144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,9 @@ func (b *Bwhatsapp) HandleTextMessage(message whatsapp.TextMessage) {
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 message.Info.Source != nil {
senderJID = *message.Info.Source.Participant
}
}
// translate sender's JID to the nicest username we can get