summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-07-30 23:55:31 +0200
committerGitHub <noreply@github.com>2020-07-30 23:55:31 +0200
commitebd2073144137b1c2ecd6727d67f608cdb0138aa (patch)
tree8fb8b6bba60656fe2eae94bba28c9397344a9e03
parent1e94b716fbc4d03e6219debd1c4f1b3237ba27aa (diff)
downloadmatterbridge-msglm-ebd2073144137b1c2ecd6727d67f608cdb0138aa.tar.gz
matterbridge-msglm-ebd2073144137b1c2ecd6727d67f608cdb0138aa.tar.bz2
matterbridge-msglm-ebd2073144137b1c2ecd6727d67f608cdb0138aa.zip
Handle panic in whatsapp. Fixes #1180 (#1184)
-rw-r--r--bridge/whatsapp/handlers.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/bridge/whatsapp/handlers.go b/bridge/whatsapp/handlers.go
index 8ea4b077..9adb1eb0 100644
--- a/bridge/whatsapp/handlers.go
+++ b/bridge/whatsapp/handlers.go
@@ -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