collab_client: Pass raw message to handleClientMessage_* hooks

This commit is contained in:
Richard Hansen 2021-12-05 22:32:27 -05:00
parent 9b7108d730
commit 5fe5a87c85
3 changed files with 10 additions and 7 deletions

View file

@ -300,7 +300,7 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad)
// Similar for NEW_CHANGES
if (msg.type === 'NEW_CHANGES') msg.payload = msg;
hooks.callAll(`handleClientMessage_${msg.type}`, {payload: msg.payload});
hooks.callAll(`handleClientMessage_${msg.type}`, {msg, payload: msg.payload});
};
const updateUserInfo = (userInfo) => {