pluginfw: Make the NEW_CHANGES payload include the message in handleClientMessage

Gared-robots.txt
John McLear 2020-06-12 12:26:33 +01:00 committed by GitHub
parent 85383a316d
commit 045ac70db8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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});
}