Conversation overview
Understand the relationship between conversation records, target entities, conversation IDs, and list synchronization.
A conversation represents the client-side chat record maintained by the signed-in user for a specific one-to-one peer or group. The IMConversation object encapsulates the target entity, display name, latest message summary, unread badge count, draft content, and user-specific conversation preferences.
| Identifier | Description |
|---|---|
conversationID | Stable conversation identifier used across message retrieval, read receipts, and conversation preferences. |
userID | Target peer user ID for one-to-one chats. |
groupID | Target group ID for group chats. |
sourceID | Target entity identifier when querying by target: peer user ID for direct chats, group ID for group chats. |
Use SessionType.Single for direct chats and SessionType.WriteGroup for group chats. Do not manually format or concatenate string patterns to generate a conversationID; obtain it from the SDK.
Initialize the conversation list by fetching a snapshot with Retrieve conversation list, then apply incremental updates received from new and changed conversation events. Merge updates into your client store using conversationID. After reconnection, account synchronization, or when updates may have been missed, re-query the list to reconcile state.
Conversation settings—such as pinning, flags, remarks, drafts, message receive options, burn-after-reading timers, and server destruction policies—operate independently. Each capability is documented under its specific operation guide to prevent accidental field overwrites.
Was this page helpful?