Overview
Returns an async function that sends a message to a conversation. An optimistic entry is inserted into Redux immediately — with a temporary ID — and replaced by the server-confirmed message on success. If the request fails, the optimistic message is flagged withsendFailed: true.
Requires
ChatProvider in the component tree.Usage Example
Props
The ID of the conversation to send the message to.
Parameters
The hook returns a function. That function accepts:Plain text content of the message.
GIF attachment data.
User mentions to embed in the message.
Arbitrary key-value data attached to the message.
ID of the message being quoted. Populates
quotedMessage on the stored message.ID of the parent message when sending a thread reply.
File attachments. When provided, the request is sent as
multipart/form-data.Returns
The server-confirmed ChatMessage object.
Notes
- At least one of
content,gif,files, or non-emptymetadatashould be provided for a meaningful message. - For integration guidance, see Chat: Messages.

