fix: patch proto sync receipts

This commit is contained in:
Adhiraj Singh
2022-04-03 00:15:06 +05:30
parent f9ffb0f4c8
commit 64bab02b7c
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -152,7 +152,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const normalizedContent = !!msg.message ? normalizeMessageContent(msg.message) : undefined
const isAnyHistoryMsg = !!normalizedContent?.protocolMessage?.historySyncNotification
if(isAnyHistoryMsg) {
await sendReceipt(msg.key.remoteJid!, undefined, [msg.key.id], 'hist_sync')
const jid = jidEncode(jidDecode(msg.key.remoteJid!).user, 'c.us')
await sendReceipt(jid, undefined, [msg.key.id], 'hist_sync')
// we only want to sync app state once we've all the history
// restart the app state sync timeout
logger.debug('restarting app sync timeout')