- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
ConversationInfo is the common conversation object provided by the SDK. Its conversation property (of type Conversation) uniquely identifies a conversation. Conversation contains two properties: conversationType identifies the conversation type and conversationId identifies the conversation ID.
| Property | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
| lastMessage | Message | Latest message in the conversation | 1.0.0 |
| unreadCount | int | Unread count for the current conversation | 1.0.0 |
| sortTime | long | Conversation sort time (server time) | 1.0.0 |
| isTop | boolean | Whether the conversation is pinned | 1.0.0 |
| topTime | long | Conversation pin time | 1.0.0 |
| mute | boolean | Whether Mute Notifications is enabled | 1.0.0 |
| draft | String | Conversation draft | 1.0.0 |
| mentionInfo | ConversationMentionInfo | Mention information | 1.0.0 |
| displayName | String | Conversation display name, shown according to the default display rules | 1.8.39 |
| alias | String | Conversation alias. Uses the group alias for group conversations and the friend alias for private conversations. | 1.8.39 |
| name | String | Conversation name. Uses the group name for group conversations and the user name for private conversations. | 1.8.39 |
| portrait | String | Conversation avatar URL | 1.8.39 |
JConversationInfo is the common conversation object provided by the SDK. Its conversation property (of type JConversation) uniquely identifies a conversation. JConversation contains two properties: conversationType identifies the conversation type and conversationId identifies the conversation ID.
| Property | Type | Description | Version |
|---|---|---|---|
| conversation | JConversation | Conversation identifier | 1.0.0 |
| lastMessage | JMessage | Latest message in the conversation | 1.0.0 |
| unreadCount | int | Unread count for the current conversation | 1.0.0 |
| sortTime | long long | Conversation sort time (server time) | 1.0.0 |
| isTop | BOOL | Whether the conversation is pinned | 1.0.0 |
| topTime | long long | Conversation pin time | 1.0.0 |
| mute | BOOL | Whether Mute Notifications is enabled | 1.0.0 |
| draft | NSString | Conversation draft | 1.0.0 |
| mentionInfo | JConversationMentionInfo | Mention information | 1.0.0 |
| displayName | NSString | Conversation display name, shown according to the default display rules | 1.8.39 |
| alias | NSString | Conversation alias. Uses the group alias for group conversations and the friend alias for private conversations. | 1.8.39 |
| name | NSString | Conversation name. Uses the group name for group conversations and the user name for private conversations. | 1.8.39 |
| portrait | NSString | Conversation avatar URL | 1.8.39 |
| Property | Type | Description | Version |
|---|---|---|---|
| conversationId | String | Conversation ID. For PRIVATE conversations, it is the recipient userId; for GROUP conversations, it is the group ID. | 1.0.0 |
| conversationType | Number | Conversation type | 1.0.0 |
| conversationTitle | String | Conversation title. To change it, update the corresponding user or group name. | 1.0.0 |
| conversationPortrait | String | Conversation avatar. To change it, update the corresponding user or group avatar. | 1.0.0 |
| conversationExts | Object | Conversation extensions. To change them, update the corresponding user or group extensions. | 1.0.0 |
| conversationAlias | String | Conversation alias. Uses the group alias for group conversations and the friend alias for private conversations. | 1.9.7 |
| latestMessage | Message | Latest message in the conversation. See Message for details. | 1.0.0 |
| draft | String | Conversation draft. It is stored locally and is not synchronized across clients. | 1.0.0 |
| isTop | Boolean | Whether the conversation is pinned | 1.0.0 |
| latestReadIndex | Number | Largest message index among read messages in the current conversation | 1.0.0 |
| latestUnreadIndex | Number | Largest message index among unread messages in the current conversation. It is used when clearing unread messages for a single conversation. | 1.0.0 |
| undisturbType | Number | Mute Notifications type, used to display the Mute Notifications state for a conversation | 1.0.0 |
| sortTime | Number | Conversation sort time. Conversation lists are sorted by sortTime in descending order by default. | 1.0.0 |
| unreadCount | Number | Unread count for the current conversation | 1.0.0 |
| unreadTag | Number | Conversation marker state | 1.0.0 |
| mentions | Object | Conversation mention-message indicator. mentions is cleared after calling Clear Unread Messages for a Single Conversation. | 1.7.0 |
| mentions.isMentioned | Boolean | Whether the conversation contains a message that mentions the current user. When true, the UI can display Someone mentioned me. | 1.7.0 |
| mentions.senders | Array | List of message senders who mentioned the current user. It can be used to display their avatars and names in the conversation; see the example below for its structure. | 1.7.0 |
| mentions.msgs | Array | List of mention messages in the conversation; see the example below for its structure. | 1.7.0 |
| mentions.count | Number | Number of mention messages in the conversation | 1.7.0 |
Mentions Data Structure:
{
conversationId: 'Akd1kdlsf'
conversationType: 2,
//...
mentions: {
// whether the current user was mentioned
isMentioned: true,
senders: [
{ id: "userId01", name: "Xs", portrait: "https://xxx.com/avatar.png", updatedTime: 1726113434045, exts: {} }
],
msgs: [
{ senderId: "userId01", messageId: "nut3lupwjgnlukc9", sentTime: 1728964798161 }
],
count: 2
},
}
ConversationInfo is the common conversation object provided by the SDK. Its conversation property (of type Conversation) uniquely identifies a conversation. Conversation contains two properties: conversationType identifies the conversation type and conversationId identifies the conversation ID.
| Property | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 0.0.63 |
| lastMessage | Message | Latest message in the conversation | 0.0.63 |
| unreadCount | int | Unread count for the current conversation | 0.0.63 |
| sortTime | int | Conversation sort time (server time) | 0.0.63 |
| isTop | bool | Whether the conversation is pinned | 0.0.63 |
| topTime | int | Conversation pin time | 0.0.63 |
| mute | bool | Whether Mute Notifications is enabled | 0.0.63 |
| draft | String | Conversation draft | 0.0.63 |
| mentionInfo | ConversationMentionInfo | Mention information | 0.0.63 |
| name | String | Conversation name. Uses the group name for group conversations and the user name for private conversations. | 0.0.72 |
| portrait | String | Conversation avatar URL | 0.0.72 |
| displayName | String | Conversation display name, shown according to the default display rules | 0.0.72 |
| alias | String | Conversation alias. Uses the group alias for group conversations and the friend alias for private conversations. | 0.0.72 |
ConversationInfo is the common conversation object provided by the SDK. Its conversation property (of type Conversation) uniquely identifies a conversation. Conversation contains two properties: conversationType identifies the conversation type and conversationId identifies the conversation ID.
| Property | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
| lastMessage | Message | Latest message in the conversation | 1.0.0 |
| unreadCount | number | Unread count for the current conversation | 1.0.0 |
| sortTime | number | Conversation sort time (server time) | 1.0.0 |
| isTop | boolean | Whether the conversation is pinned | 1.0.0 |
| topTime | number | Conversation pin time | 1.0.0 |
| isMute | boolean | Whether Mute Notifications is enabled | 1.0.0 |
| draft | string | Conversation draft | 1.0.0 |
| hasUnread | boolean | Whether there are unread messages | 1.0.0 |
| mentionInfo | ConversationMentionInfo | Mention information | 1.0.0 |
| name | string | Conversation name | 1.0.0 |
| avatar | string | Conversation avatar | 1.0.0 |
| extra | object | Conversation extension information | 1.0.0 |
Conversation Object Properties:
| Property | Type | Description |
|---|---|---|
| conversationType | number | Conversation type: 1 for private chat, 2 for group, 3 for chatroom, and 4 for system conversation |
| conversationId | string | Conversation ID |
ConversationInfo is the common conversation object provided by the SDK. Its conversation property (of type Conversation) uniquely identifies a conversation. Conversation contains two properties: conversationType identifies the conversation type and conversationId identifies the conversation ID.
| Property | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
| lastMessage | Message | Latest message in the conversation | 1.0.0 |
| unreadCount | number | Unread count for the current conversation | 1.0.0 |
| sortTime | number | Conversation sort time (server time) | 1.0.0 |
| isTop | boolean | Whether the conversation is pinned | 1.0.0 |
| topTime | number | Conversation pin time | 1.0.0 |
| mute | boolean | Whether Mute Notifications is enabled | 1.0.0 |
| draft | string | Conversation draft | 1.0.0 |
| mentionInfo | ConversationMentionInfo | Mention information | 1.0.0 |