Fix getMoreHistory to not return lastKnownHash

pull/1/head
ClemDee 6 years ago
parent 1c226d92b9
commit 287daac085

@ -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,6 +195,7 @@ define([
historyState = false; historyState = false;
return; return;
} }
if (data.hash !== lastKnownHash) {
messages.push({ messages.push({
type: type, type: type,
content: { content: {
@ -203,6 +204,7 @@ define([
hash: data.hash hash: data.hash
} }
}); });
}
}; };
}; };
mailbox.getNotificationsHistory = function (type, count, lastKnownHash, cb) { mailbox.getNotificationsHistory = function (type, count, lastKnownHash, cb) {

Loading…
Cancel
Save