Merge pull request #931 from MarkTraceur/hook/plugin/handleClientMessage

Add in a plugin hook "handleClientMessage_<MSG_NAME>"
pull/929/merge
John McLear 2012-08-12 08:52:53 -07:00
commit 1eb63535ca
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@
*/
var chat = require('./chat').chat;
var hooks = require('./pluginfw/hooks');
// Dependency fill on init. This exists for `pad.socket` only.
// TODO: bind directly to the socket.
@ -337,6 +338,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
{
callbacks.onServerMessage(msg.payload);
}
hooks.callAll('handleClientMessage_' + msg.type, {payload: msg.payload});
}
function updateUserInfo(userInfo)