mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
PadMessageHandler: Run the clientReady
hook asynchronously
This commit is contained in:
parent
5d30e0b1b2
commit
fa54dc1053
2 changed files with 2 additions and 2 deletions
|
@ -851,7 +851,7 @@ The context is the raw message received from the user.
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
exports.clientReady = (hookName, {padId}) => {
|
exports.clientReady = async (hookName, {padId}) => {
|
||||||
console.log(`Client has joined pad ${padId});
|
console.log(`Client has joined pad ${padId});
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
|
@ -832,7 +832,7 @@ const handleClientReady = async (socket, message, authorID) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hooks.callAll('clientReady', message);
|
await hooks.aCallAll('clientReady', message);
|
||||||
|
|
||||||
// Get ro/rw id:s
|
// Get ro/rw id:s
|
||||||
const padIds = await readOnlyManager.getIds(message.padId);
|
const padIds = await readOnlyManager.getIds(message.padId);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue