Skip to main content

Overview

Fetches the full details of a single conversation by ID and provides update and deleteConversation actions. The conversation is loaded once on mount if it is not already in Redux state. A change made through update updates it at once; a change another member makes, and memberCount, are as of the last fetch. A copy that came from the inbox (for example a group you just created) is fetched in full when you open it, so currentMember is always loaded.
Requires ChatProvider in the component tree.

Usage Example

Props

string
required
The ID of the conversation to fetch and manage.

Returns

Conversation | null
The full Conversation object, or null while loading or if not found.
boolean
true while the initial fetch is in progress.
(params: { name?: string; description?: string; avatarFile?: { file: UploadFileInput; options: UploadImageOptions }; removeFileIds?: string[]; postingPermission?: 'members' | 'team' }) => Promise<Conversation | undefined>
Updates the conversation. Dispatches the updated conversation to Redux on success. conversationId is already bound from the hook props and should not be passed here.
() => Promise<void>
Deletes the conversation. Does not update local Redux state — the caller is responsible for navigating away or removing the conversation from local lists.

Notes