Fix getMoreHistory to not return lastKnownHash

This commit is contained in:
ClemDee 2019-07-02 09:58:04 +02:00
parent 1c226d92b9
commit 287daac085

View File

@ -180,7 +180,7 @@ define([
var txid = Util.uid(); var txid = Util.uid();
execCommand('LOAD_HISTORY', { execCommand('LOAD_HISTORY', {
type: type, type: type,
count: count, count: lastKnownHash ? count + 1 : count,
txid: txid, txid: txid,
lastKnownHash: lastKnownHash lastKnownHash: lastKnownHash
}, function (err, obj) { }, function (err, obj) {
@ -195,14 +195,16 @@ define([
historyState = false; historyState = false;
return; return;
} }
messages.push({ if (data.hash !== lastKnownHash) {
type: type, messages.push({
content: { type: type,
msg: data.message, content: {
time: data.time, msg: data.message,
hash: data.hash time: data.time,
} hash: data.hash
}); }
});
}
}; };
}; };
mailbox.getNotificationsHistory = function (type, count, lastKnownHash, cb) { mailbox.getNotificationsHistory = function (type, count, lastKnownHash, cb) {