From bc1bf6079aa140b353bc7a2c24404da52c467764 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 4 Nov 2021 01:35:17 +0200 Subject: [PATCH] Fix INITIAL_BOOTSTRAP history syncs not being handled --- historysync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/historysync.go b/historysync.go index 0e12fc1..4fed658 100644 --- a/historysync.go +++ b/historysync.go @@ -66,7 +66,7 @@ func (user *User) handleHistorySyncsLoop() { } func (user *User) handleHistorySync(evt *waProto.HistorySync) { - if evt.GetSyncType() != waProto.HistorySync_RECENT && evt.GetSyncType() != waProto.HistorySync_FULL { + if evt == nil || evt.SyncType == nil || evt.GetSyncType() == waProto.HistorySync_INITIAL_STATUS_V3 || evt.GetSyncType() == waProto.HistorySync_PUSH_NAME { return } user.log.Infofln("Handling history sync with type %s, %d conversations, chunk order %d, progress %d%%", evt.GetSyncType(), len(evt.GetConversations()), evt.GetChunkOrder(), evt.GetProgress())