PadMessageHandler: Run the `userLeave` hook asynchronously

pull/5255/head
Richard Hansen 2021-10-29 22:52:17 -04:00
parent f2a118b311
commit 5d30e0b1b2
2 changed files with 2 additions and 2 deletions

View File

@ -834,7 +834,7 @@ Context properties:
Example:
```javascript
exports.userLeave = (hookName, {author, padId}) => {
exports.userLeave = async (hookName, {author, padId}) => {
console.log(`${author} left pad ${padId}`);
};
```

View File

@ -148,7 +148,7 @@ exports.handleDisconnect = async (socket) => {
},
},
});
hooks.callAll('userLeave', session);
await hooks.aCallAll('userLeave', session);
};
/**