mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
PadMessageHandler: Run the userLeave
hook asynchronously
This commit is contained in:
parent
f2a118b311
commit
5d30e0b1b2
2 changed files with 2 additions and 2 deletions
|
@ -834,7 +834,7 @@ Context properties:
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
exports.userLeave = (hookName, {author, padId}) => {
|
exports.userLeave = async (hookName, {author, padId}) => {
|
||||||
console.log(`${author} left pad ${padId}`);
|
console.log(`${author} left pad ${padId}`);
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
|
@ -148,7 +148,7 @@ exports.handleDisconnect = async (socket) => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
hooks.callAll('userLeave', session);
|
await hooks.aCallAll('userLeave', session);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue