history: improve history sync and support new payload
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user