Trigger | Description |
---|---|
after_message | The endpoint will be triggered after a message is sent. |
before_message | The endpoint will be triggered when a message is in-flight. |
after_message
trigger is fairly straightforward. CometChat will call your endpoint once a message has been sent.
The before_message
trigger is useful when you want to add metadata to a message before it reaches the recipient. The data you return will be automatically added to the message metadata: