new Conversation()
Conversation object, used to describe the properties of a conversation, including the conversation type, message unread count, and latest message
Properties:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
conversationID |
String |
Conversation ID. Supported formats are as follows:
|
|||||||||||||||||||||||||||||||||||||
type |
String |
Conversation type. Supported values are as follows:
|
|||||||||||||||||||||||||||||||||||||
subType |
String |
Group type of a group conversation. Supported values are as follows:
|
|||||||||||||||||||||||||||||||||||||
unreadCount |
Number |
Unread message count. TIM.TYPES.GRP_MEETING and TIM.TYPES.GRP_AVCHATROOM groups do not support the unread count feature, and this field is 0 for them. |
|||||||||||||||||||||||||||||||||||||
lastMessage |
Object |
Latest message of the conversation Properties
|
|||||||||||||||||||||||||||||||||||||
groupProfile |
Group |
Group profile of a group conversation |
|||||||||||||||||||||||||||||||||||||
userProfile |
Profile |
User profile of a C2C conversation |
|||||||||||||||||||||||||||||||||||||
groupAtInfoList |
Array.<GroupAtInfo> |
@ information list of a group conversation, which can be used by the access side to display "someone@me" or "@All" notifications on the conversation list. GroupAtInfo - Group @ information structure is supported from v2.9.0. |
|||||||||||||||||||||||||||||||||||||
remark |
String |
Friend remarks. This field has a value only for a C2C conversation where the peer party is my friend and I have set remarks for this friend (supported from v2.13.0). |
|||||||||||||||||||||||||||||||||||||
isPinned |
Boolean |
Whether the conversation is pinned on top (supported from v2.14.0) |
Type Definitions
GroupAtInfo
Properties:
Name | Type | Description |
---|---|---|
groupID |
String |
Group ID |
messageSequence |
Number |
Sequence number of a message with @ information |
atTypeArray |
Array.<Number> |
@ type array. Enumerated values of group conversation @ types are as follows:
|
Group @ information structure