history: improve history sync and support new payload

This commit is contained in:
Rajeh Taher
2025-11-06 23:52:38 +02:00
parent a8b8eceb72
commit abf5af0e72
3 changed files with 14 additions and 9 deletions
+1 -1
View File
@@ -1036,7 +1036,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
const historyMsg = getHistoryMsg(msg.message!)
const shouldProcessHistoryMsg = historyMsg
? shouldSyncHistoryMessage(historyMsg) && PROCESSABLE_HISTORY_TYPES.includes(historyMsg.syncType!)
? shouldSyncHistoryMessage(historyMsg) && PROCESSABLE_HISTORY_TYPES.includes(historyMsg.syncType! as proto.HistorySync.HistorySyncType)
: false
// State machine: decide on sync and flush