From ebd2073144137b1c2ecd6727d67f608cdb0138aa Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 30 Jul 2020 23:55:31 +0200 Subject: Handle panic in whatsapp. Fixes #1180 (#1184) --- bridge/whatsapp/handlers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bridge') 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 -- cgit v1.2.3