Skip to main content

Overview

Returns an async function that updates a conversation’s details via the API. This is a low-level hook — it makes the PATCH request and returns the updated conversation without touching Redux state. Use it when you need direct control over when and how state is updated.
Requires ChatProvider in the component tree.

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
The ID of the conversation to update.
string
New conversation name.
string
New conversation description.
string | null
File ID for the avatar image. Pass null to remove the current avatar.
'members' | 'admins'
Who can post messages. Only applicable to space conversations.

Returns

Conversation
The updated Conversation object.

Notes

  • This hook does not update Redux state. If you want the result reflected in the UI, dispatch setConversation manually or use useConversation which handles this automatically.
  • For integration guidance, see Chat: Conversations.