Fix GET_HISTORY_RANGE returning same message multiple times #2035

This commit is contained in:
yflory 2025-08-25 12:02:51 +02:00
parent 437bc15e96
commit a99926f9fe

View File

@ -804,7 +804,7 @@ const handleGetHistoryRange = function (Env, Server, seq, userId, parsed) {
if (hash === untilHash || untilHash === 'NONE') { found = true; }
let then = hash === oldestKnownHash ? abort : readMore;
if (found) {
Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId,
return void Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId,
JSON.stringify(['HISTORY_RANGE', txid, parsed])], then);
}
return void readMore();