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
+6 -1
View File
@@ -96,7 +96,12 @@ export const downloadAndProcessHistorySyncNotification = async (
msg: proto.Message.IHistorySyncNotification,
options: RequestInit
) => {
const historyMsg = await downloadHistory(msg, options)
let historyMsg: proto.HistorySync
if (msg.initialHistBootstrapInlinePayload) {
historyMsg = proto.HistorySync.decode(await inflatePromise(msg.initialHistBootstrapInlinePayload))
} else {
historyMsg = await downloadHistory(msg, options)
}
return processHistoryMessage(historyMsg)
}