mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Fix handleClientMessage_USER_* payloads not containing user info
This commit is contained in:
parent
4ad759dd25
commit
aab7186486
1 changed files with 10 additions and 4 deletions
|
@ -414,6 +414,12 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
||||||
{
|
{
|
||||||
callbacks.onServerMessage(msg.payload);
|
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});
|
hooks.callAll('handleClientMessage_' + msg.type, {payload: msg.payload});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue