diff options
Diffstat (limited to '')
-rwxr-xr-x | lib/ot/editor-socketio-server.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ot/editor-socketio-server.js b/lib/ot/editor-socketio-server.js index 1b2529be..9e4ddf96 100755 --- a/lib/ot/editor-socketio-server.js +++ b/lib/ot/editor-socketio-server.js @@ -43,6 +43,7 @@ EditorSocketIOServer.prototype.addClient = function (socket) { socket.on('operation', function (revision, operation, selection) { operation = LZString.decompressFromUTF16(operation); operation = JSON.parse(operation); + socket.origin = 'operation'; self.mayWrite(socket, function (mayWrite) { if (!mayWrite) { console.log("User doesn't have the right to edit."); @@ -59,6 +60,7 @@ EditorSocketIOServer.prototype.addClient = function (socket) { self.onGetOperations(socket, base, head); }); socket.on('selection', function (obj) { + socket.origin = 'selection'; self.mayWrite(socket, function (mayWrite) { if (!mayWrite) { console.log("User doesn't have the right to edit."); @@ -104,6 +106,7 @@ EditorSocketIOServer.prototype.onOperation = function (socket, revision, operati 'operation', clientId, revision, wrappedPrime.wrapped.toJSON(), wrappedPrime.meta ); + //set document is dirty this.isDirty = true; } catch (exc) { logger.error(exc); |