Fix last known hash sent to onlyoffice (it is already known...)

pull/1/head
yflory 2019-01-31 15:26:03 +01:00
parent 0c4c9dd283
commit 07cd0b21b6
1 changed files with 4 additions and 1 deletions

View File

@ -127,7 +127,10 @@ define([
// Keep only the history for our channel
if (parsed[3] !== channel) { return; }
chan.lastKnownHash = msg.slice(0,64);
var hash = msg.slice(0,64);
if (hash === chan.lastKnownHash || hash === chan.lastCpHash) { return; }
chan.lastKnownHash = hash;
ctx.emit('MESSAGE', msg, chan.clients);
chan.history.push(msg);
});