mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: chats.delete patch on sync
This commit is contained in:
@@ -682,7 +682,12 @@ export const processSyncAction = (
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if(action?.deleteChatAction) {
|
} else if(action?.deleteChatAction) {
|
||||||
ev.emit('chats.delete', [id])
|
if(
|
||||||
|
isValidPatchBasedOnMessageRange(id, action?.deleteChatAction?.messageRange)
|
||||||
|
|| !isInitialSync
|
||||||
|
) {
|
||||||
|
ev.emit('chats.delete', [id])
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.warn({ syncAction, id }, 'unprocessable update')
|
logger.warn({ syncAction, id }, 'unprocessable update')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user