Skip to main content

Overview

Returns an async function that patches an existing message’s content. The updated message is dispatched to Redux on success. The editedAt field is set by the server and reflects the time of the most recent edit.
Requires ChatProvider in the component tree.

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
The ID of the conversation that contains the message.
string
required
The ID of the message to edit.
string
New text content.
GifData | null
New or cleared GIF attachment.
Mention[]
Updated mentions list.
Record<string, any>
Updated metadata.

Returns

ChatMessage
The updated ChatMessage returned by the server.

Notes

  • Other participants see the update in real-time via the message:updated socket event, which is handled automatically by ChatProvider.
  • For integration guidance, see Chat: Messages.