From 6caf4c3ed13ef16c11b645b594dda0cf72e13867 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 19 Dec 2024 13:25:45 +0100 Subject: [PATCH] chore: properly consumme lastKnownHLC on list operations call --- umap/static/umap/js/modules/sync/engine.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/modules/sync/engine.js b/umap/static/umap/js/modules/sync/engine.js index caa36058..651825ce 100644 --- a/umap/static/umap/js/modules/sync/engine.js +++ b/umap/static/umap/js/modules/sync/engine.js @@ -183,9 +183,13 @@ export class SyncEngine { * @param {string} payload.sender the uuid of the requesting peer * @param {string} payload.latestKnownHLC the latest known HLC of the requesting peer */ - onListOperationsRequest({ sender, lastKnownHLC }) { + onListOperationsRequest({ sender, message }) { + debug( + `received operations request from peer ${sender} (since ${message.lastKnownHLC})` + ) + this.sendToPeer(sender, 'ListOperationsResponse', { - operations: this._operations.getOperationsSince(lastKnownHLC), + operations: this._operations.getOperationsSince(message.lastKnownHLC), }) }