chat: New chatSendMessage client-side hook

This commit is contained in:
Richard Hansen 2021-10-26 02:08:14 -04:00
parent 4c2f7f9a11
commit 9fbd2e5c3d
4 changed files with 71 additions and 3 deletions

View file

@ -315,6 +315,18 @@ Context properties:
* `duration`: How long (in milliseconds) to display the gritter notification (0
to disable).
## `chatSendMessage`
Called from: `src/static/js/chat.js`
This hook runs on the client side whenever the user sends a new chat message.
Plugins can mutate the message object to change the message text or add metadata
to control how the message will be rendered by the `chatNewMessage` hook.
Context properties:
* `message`: The message object that will be sent to the Etherpad server.
## collectContentPre
Called from: src/static/js/contentcollector.js