diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 591eccc2c..195991db9 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -1156,6 +1156,14 @@ define([ }; var handleChanges = function (obj, send) { + if (APP.history) { + send({ + type: "unSaveLock", + index: ooChannel.cpIndex, + time: +new Date() + }); + return; + } // Add a new entry to the pendingChanges object. // If we can't send the patch within 30s, force a page reload var uid = Util.uid(); diff --git a/www/common/outer/onlyoffice.js b/www/common/outer/onlyoffice.js index b5c3e7ba1..dbde5e199 100644 --- a/www/common/outer/onlyoffice.js +++ b/www/common/outer/onlyoffice.js @@ -87,8 +87,10 @@ define([ chan.wc = wc; chan.sendMsg = function (msg, cb) { cb = cb || function () {}; + var hash = msg.slice(0, 64); wc.bcast(msg).then(function () { chan.history.push(msg); + chan.lastKnownHash = hash; cb(); }, function (err) { cb({error: err});