Fix handleClientMessage_USER_* payloads not containing user info
parent
4ad759dd25
commit
aab7186486
|
@ -414,6 +414,12 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
{
|
||||
callbacks.onServerMessage(msg.payload);
|
||||
}
|
||||
|
||||
//HACKISH: User messages do not have "payload" but "userInfo", so that all "handleClientMessage_USER_" hooks would work, populate payload
|
||||
//FIXME: USER_* messages to have "payload" property instead of "userInfo", seems like a quite a big work
|
||||
if(msg.type.indexOf("USER_") > -1) {
|
||||
msg.payload = msg.userInfo;
|
||||
}
|
||||
hooks.callAll('handleClientMessage_' + msg.type, {payload: msg.payload});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue