From 85d57d52bba50ff0889176a8c2a1c1a83e25cf84 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 25 Aug 2019 19:41:46 +0300 Subject: [PATCH] Log better error when parsing message fails --- portal.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/portal.go b/portal.go index 1fe0a02..4773094 100644 --- a/portal.go +++ b/portal.go @@ -674,6 +674,10 @@ func (portal *Portal) handleHistory(user *User, messages []interface{}) { continue } data := whatsapp.ParseProtoMessage(message) + if data == nil { + portal.log.Warnln("Message", message.GetKey().GetId(), "failed to parse during backfilling") + continue + } if portal.privateChatBackfillInvitePuppet != nil && message.GetKey().GetFromMe() && portal.IsPrivateChat() { portal.privateChatBackfillInvitePuppet() }