tencent cloud

Chat

News and Announcements
Release Notes
Announcements
Product Introduction
Overview
Basic Concepts
Scenarios
Features
Account System
User Profile and Relationship Chain
Message Management
Group Related
Official Account
Audio/Video Call
Use Limits
Purchase Guide
Billing Overview
Pricing
Purchase Instructions
Renewal Guide
Service Suspension Explanation
Refund Policy
Development Guidelines
Demo Zone
Activate Service
Free Demos
Quick Run
Download
SDK and Demo Source Code
Update Log
Chat Interaction (UI Included)
TUIKit Introduction
Getting Started
Full-feature Integration
Single-function Integration
Build with AI
Build Basic Interfaces
More Features
Customizing Appearance
Internationalization
Push Service
Overview
Noun explanation
Activate the Service
Quick Start
Manufacturer Channel
Statistics
Troubleshooting Tool
Client APIs
REST API
Push Callback
Advanced Features
Release Notes
Error Codes
FAQS
Desk
Overview
Quick Start
Integration Guide
Admin Operation Manual
Agent Manual
More Practices
Live Streaming Setup Guide
AI Chatbot
Super Large Entertainment and Collaboration Community
Discord Implementation Guide
How to Integrate Chat into Games
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
No UI Integration
Quick Start
SDK Integration
Initialization
Login and Logout
Message
Conversation
Group
Community Topic
User Profile and Relationship Chain
Offline Push
Cloud Search
Local Search
Official Channel Management
Client APIs
JavaScript
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
Server APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
Console Guide
New Console Introduction
Creating and Upgrading an Application
Basic Configuration
Feature Configuration
Account Management
Group Management
Official Channel Management
Webhook Configuration
Usage
Viewing Guide for Resource Packages
Real-Time Monitor
Auxiliary Development Tools
Access Management
Advanced Features
FAQs
uni-app FAQs
Purchase
SDK
Account Authentication
User Profile and Relationship Chain
Message
Group
Audio-Video Group
Nickname and Profile Photo
Security Compliance Certification
Service Level Agreement
Security Compliance Certification
Chat Policies
Privacy Policy
Data Privacy and Security Agreement
Migration
Migration Solutions
Migration Solutions Lite
Error Codes
Contact Us

Android&iOS&Windows&Mac

PDF
Focus Mode
Font Size
Last updated: 2025-01-13 17:17:17

Overview

When a user creates a one-to-one or group chat, and a message is sent or received in it, a conversation will be created. In the Chat SDK, the conversation management class is V2TIMConversationManager(Java) or V2TIMManager(Conversation)(Objective-C). You can use the conversation management class APIs to display/update the conversation list, update the unread count, pin a conversation to the top, make a conversation draft, and mute message notifications.

Conversation Class

The conversation class is V2TIMConversation (Java / Swift / Objective-C / C++), which defines the following content:
Attribute
Definition
Description
type
Conversation type
See the definition of V2TIMConversationType, which can be C2C or Group.
conversationID
Unique conversation ID
It is in the format of c2c_userID for a one-to-one chat or group_groupID for a group chat.
userID
User ID of the message receiver
userID stores the user ID of the message receiver if the conversation type is one-to-one chat; otherwise, it is empty.
groupID
Group ID
groupID stores the group ID if the conversation type is group chat; otherwise, it is empty.
groupType
Group type
groupType is the type of the group if the conversation type is group chat; otherwise, it is empty.
showName
Displayed conversation name
The name of a group conversation is displayed in the following order of priority: group name > group ID;
The name of a one-to-one conversation is displayed in the following order of priority: friend remarks of the message receiver > nickname of the message receiver > userID of the message receiver.
faceUrl
Displayed conversation profile photo
It is the group profile photo for a group chat or the profile photo of the message receiver for a one-to-one chat.
unreadCount
Unread message count of the conversation
For detailed directions, see Conversation Unread Count. It is invalid and defaults to 0 for an audio-video group (AVChatRoom).
recvOpt
Message receiving option
See the definition of V2TIMReceiveMessageOpt and the use directions Do not Notify.
lastMessage
Last message in the conversation
For detailed directions, see Conversation List.
groupAtInfolist
List of @ information in the group conversation
Generally, it is used to display the notifications of "someone@me" and "@all".
draftText
Draft information
The draft information can be set by calling the setConversationDraft API. For detailed directions, see Conversation Draft.
draftTimestamp
Draft editing time
It is automatically generated when a draft is set.
isPinned
Whether to pin the conversation to the top
For detailed directions, see Pinning Conversation to the Top.
orderKey
Field for sorting conversations
For detailed directions, see Conversation List.
markList
Conversation mark list
For the use directions, see Conversation Mark. This attribute is supported from v6.5.
customData
Custom conversation data
To set custom data, call the setConversationCustomData API. The custom data will be stored on the cloud. Up to 256 bytes are supported. This attribute is supported from v6.5.
conversationGroupList
List of groups to which the conversation belongs
For the use directions, see Conversation Group. This attribute is supported from v6.5.
c2cReadTimestamp
Timestamp of the latest message which has been read
Valid only for one-to-one chat. Supported from v7.1.
groupReadSequence
Sequence of the latest message which has been read
Valid only for group chat. Supported from v7.1.

Conversation Storage Policy

There is no limit on the number of locally stored conversations.
Up to 100 conversations can be stored in the cloud. To increase this limit, upgrade to the Pro edition 、Pro Plus edition、Enterprise edition. Then you can set the limit to 500 in the console.
If the information of a conversation has not been updated for a long time, the conversation can be stored in the cloud for up to 7 days.
Locally stored conversations may not always be consistent with those stored in the cloud. If you do not call the deleteConversation API to delete the local conversations, these conversations will always exist. However, at most 100 conversations can be stored in the cloud. In addition, if the information of a conversation has not been updated for a long time, this conversation can be stored in the cloud for at most 7 days. Therefore, local conversations displayed on different mobile phones may be inconsistent with each other.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback