tencent cloud

Feedback

Last updated: 2023-07-17 17:00:20

    Conversation

    In the Chat SDK, there are three types of Conversation objects:
    One-to-one (C2C): A one-to-one conversation between only two users.
    GROUP: A group conversation among group members.
    @TIM#SYSTEM (system notification conversation).
    You can use the conversation class APIs to display/update the conversation list, update the unread count, pin a conversation to the top, and mute message notifications.
    
    Name
    Type
    Description
    conversationID
    String
    C2C${userID} - one-to-one conversation
    GROUP${groupID} - group conversation
    @TIM#SYSTEM - system notification conversation
    type
    String
    Type of a conversation. Valid values:
    TencentCloudChat.TYPES.CONV_C2C - one-to-one conversation
    TencentCloudChat.TYPES.CONV_GROUP - group conversation
    TencentCloudChat.TYPES.CONV_SYSTEM - system notification conversation
    unreadCount
    Number
    Unread message count of a conversation. For meeting group and audio-video group, unreadCount is always 0.
    customData
    String
    Conversation cloud custom data(saved in the cloud, and can still be pulled after the app is uninstalled and reinstalled).
    lastMessage
    Object
    Lastest message of a conversation.
    nick - String - nickname of the sender of the lastest message in a group conversation. In a one-to-one conversation, it is ''.
    lastTime - Number - Timestamp of the lastest message
    lastSequence - Number - Sequence of the lastest message
    fromAccount - String - UserID of the sender of the lastest message
    isRevoked - Boolean - true indicates the lastest message is revoked
    revoker - String | null - UserID of the one who revokes the lastest message
    isPeerRead - Boolean - true indicates the lastest message is read by peer in a one-to-one conversation
    messageForShow - String - Used to render for UI. For example: [Image],[Voice],[Video]
    type - String - Type of the latest message
    payload - String - Content of the lastest message
    groupProfile
    Group
    Group profile of a group conversation.
    userProfile
    Profile
    User profile of a one-to-one conversation.
    groupAtInfoList
    Array.<GroupAtInfo>
    List of mentioned info in a group conversation.
    remark
    String
    Friend remark of a one-to-one conversation.
    isPinned
    Boolean
    true indicates the conversation is pinned to top.
    messageRemindType
    String
    Type of message mute notification. Valid values:
    TencentCloudChat.TYPES.MSG_REMIND_ACPT_AND_NOTE - the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then sends a notification.
    TencentCloudChat.TYPES.MSG_REMIND_DISCARD - the SDK rejects a message.
    TencentCloudChat.TYPES.MSG_REMIND_ACPT_NOT_NOTE - the SDK receives a message and throws a MESSAGE_RECEIVED event to notify the access side, which then does not send a notification.
    markList
    Array.<String>
    List of mark for a conversatin.
    conversationGroupList
    Array.<String>
    Group list a conversation belongs to.
    GroupAtInfo
    Name
    Type
    Description
    groupID
    String
    Group ID
    messageSequence
    Number
    Sequence of the message with mentioned info
    atTypeArray
    Array.<Number>
    Valid values:
    TencentCloudChat.TYPES.CONV_AT_ME - mentioned me
    TencentCloudChat.TYPES.CONV_AT_ALL - mentioned all
    TencentCloudChat.TYPES.CONV_AT_ALL_AT_ME - mentioned all and mentioned me
    

    Conversation Storage Policy

    By default, the client can pull 100 recent conversations from the cloud. If you upgrade to the Premium edition, up to 500 recent conversations can be pulled from the cloud. The retention period of a conversation is the same as that of the last message, which is 7 days by default.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support