mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: ack history before processing
This commit is contained in:
@@ -135,7 +135,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
const histNotification = protocolMsg!.historySyncNotification
|
||||
|
||||
logger.info({ histNotification, id: message.key.id }, 'got history notification')
|
||||
const { chats, contacts, messages, isLatest } = await downloadAndProcessHistorySyncNotification(histNotification, historyCache)
|
||||
|
||||
const meJid = authState.creds.me!.id
|
||||
await sendNode({
|
||||
@@ -147,6 +146,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
}
|
||||
})
|
||||
|
||||
const { chats, contacts, messages, isLatest } = await downloadAndProcessHistorySyncNotification(histNotification, historyCache)
|
||||
|
||||
if(chats.length) {
|
||||
ev.emit('chats.set', { chats, isLatest })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user