diff --git a/doc/api/hooks_server-side.md b/doc/api/hooks_server-side.md index 25c02aae5..14b7d574a 100644 --- a/doc/api/hooks_server-side.md +++ b/doc/api/hooks_server-side.md @@ -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}); }; ``` diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index d7c4157b2..8460cd545 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -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);