PadMessageHandler: Run the `clientReady` hook asynchronously

pull/5255/head
Richard Hansen 2021-10-30 00:18:56 -04:00
parent 5d30e0b1b2
commit fa54dc1053
2 changed files with 2 additions and 2 deletions

View File

@ -851,7 +851,7 @@ The context is the raw message received from the user.
Example:
```javascript
exports.clientReady = (hookName, {padId}) => {
exports.clientReady = async (hookName, {padId}) => {
console.log(`Client has joined pad ${padId});
};
```

View File

@ -832,7 +832,7 @@ const handleClientReady = async (socket, message, authorID) => {
return;
}
hooks.callAll('clientReady', message);
await hooks.aCallAll('clientReady', message);
// Get ro/rw id:s
const padIds = await readOnlyManager.getIds(message.padId);