clientReady hook- pass entire message, updated doc
This commit is contained in:
parent
a31e6cd332
commit
21f0d12d31
|
@ -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);
|
||||
};
|
||||
```
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue