From 045ac70db8630717e3fd34a42186d52c935b78da Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 12 Jun 2020 12:26:33 +0100 Subject: [PATCH] pluginfw: Make the NEW_CHANGES payload include the message in handleClientMessage --- src/static/js/collab_client.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/static/js/collab_client.js b/src/static/js/collab_client.js index ca83af9dd..0031354f6 100644 --- a/src/static/js/collab_client.js +++ b/src/static/js/collab_client.js @@ -309,6 +309,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad) return; } rev = newRev; + editor.applyChangesToBase(changeset, author, apool); } else if (msg.type == "ACCEPT_COMMIT") @@ -508,6 +509,9 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad) if(msg.type.indexOf("USER_") > -1) { msg.payload = msg.userInfo; } + // Similar for NEW_CHANGES + if(msg.type === "NEW_CHANGES") msg.payload = msg; + hooks.callAll('handleClientMessage_' + msg.type, {payload: msg.payload}); }