Overview
Returns an async function that deletes a message. Once the server accepts the delete, the message in the local store becomes the placeholder the server returns for it: for your own message,userDeletedAt is set and its content is cleared, sender kept; for another member’s message (a group admin’s delete), moderationStatus is "removed" and its content and sender are cleared. Every loaded copy is updated, including one quoted inside another message. See Deleted and removed messages.
Requires
ChatProvider in the component tree.Usage Example
Parameters
The hook returns a function. That function accepts:Returns
Promise<void>
Notes
- Other participants see it in real time through the
message:deletedormessage:removedsocket event, whichChatProviderhandles automatically, and their local copy becomes the same placeholder. - For integration guidance, see Chat: Messages.

