From 696fe0de9fcd75e25d1cee9aff3fda39c93e775e Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Thu, 1 Sep 2022 08:39:36 +0530 Subject: [PATCH] fix: correctly check isLatest --- src/Utils/process-message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index fc9c48d..ed3f03d 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -94,7 +94,7 @@ const processMessage = async( logger?.info({ histNotification, id: message.key.id }, 'got history notification') if(downloadHistory) { - const isLatest = historyCache.size === 0 && !creds.processedHistoryMessages?.length + const isLatest = !creds.processedHistoryMessages?.length const { chats, contacts, messages, didProcess } = await downloadAndProcessHistorySyncNotification(histNotification, historyCache, recvChats) if(chats.length) {