clientReady hook- pass entire message, updated doc

This commit is contained in:
Emily Xie 2015-07-14 17:08:35 -04:00
parent a31e6cd332
commit 21f0d12d31
2 changed files with 19 additions and 0 deletions

View File

@ -384,3 +384,20 @@ exports.userLeave = function(hook, session, callback) {
console.log('%s left pad %s', session.author, session.padId);
};
```
### clientReady
Called from src/node/handler/PadMessageHandler.js
This in context:
1. message
This hook gets called when handling a CLIENT_READY which is the first message from the client to the server.
Example:
```
exports.clientReady = function(hook, message) {
console.log('Client has entered the pad' + message.padId);
};
```

View File

@ -1009,6 +1009,8 @@ function handleClientReady(client, message)
var currentTime;
var padIds;
hooks.callAll("clientReady", message);
async.series([
//Get ro/rw id:s
function (callback)