From 07cd0b21b63d987aa9016960f2d26a43378babc4 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 31 Jan 2019 15:26:03 +0100 Subject: [PATCH] Fix last known hash sent to onlyoffice (it is already known...) --- www/common/outer/onlyoffice.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/outer/onlyoffice.js b/www/common/outer/onlyoffice.js index daaf307fd..bafd1a7b9 100644 --- a/www/common/outer/onlyoffice.js +++ b/www/common/outer/onlyoffice.js @@ -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); });