fix: correctly check isLatest

This commit is contained in:
Adhiraj Singh
2022-09-01 08:39:36 +05:30
parent e2c3d364de
commit 696fe0de9f

View File

@@ -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) {