• UIKit
  • SDK
  • 서버 API
Chat/
SDK/
Android/
대화/
SDK
  • Chat SDK 설치
  • Chat SDK 초기화
  • 로그인 및 로그아웃
  • 메시지
    • 개요
    • 메시지 보내기
    • 메시지 받기
    • 메시지 검색
    • 메시지 전달
    • 메시지 수정
    • 삽입 메시지
    • 메시지 삭제
    • 과거 메시지 비우기
    • 메시지 철회
    • 온라인 메시지 보내기
    • 메시지 읽음 확인
    • 메시지 조회
    • 알림
    • 지향적 그룹 메시지
    • 알림 차단
    • Key-Value 확장
    • 반응
    • 번역
    • 메시지 최상단 고정
  • 대화
    • 개요
    • 대화 목록
    • 대화 획득
    • 읽지 않은 메시지 수
    • 대화 최상단 고정
    • 대화 삭제
    • 초안
    • 마크
    • 대화 그룹
  • 그룹
    • 개요
    • 그룹 관리
    • 정보
    • 멤버 관리
    • 멤버 정보
    • 속성
    • 카운터
  • 커뮤니티 및 화제
    • 커뮤니티 관리
    • 권한 그룹
  • 사용자
    • 사용자 정보
    • 사용자 상태
    • 친구 관리
    • 친구 그룹화
    • 블록리스트
    • Follow
  • 국부 검색
    • 메시지 검색
    • 친구 검색
    • 그룹 검색
    • 그룹 멤버 검색
  • 시그널링
  • 인터페이스 참고 문서
    • Java
  • Guideline for Beginners
  • 콘솔 안내
    • 애플리케이션 생성 및 업그레이드
    • 기본 구성
    • 기능 구성
    • 계정 관리
    • 그룹 관리
    • 콜백 구성
  • 제품 소개
    • 메시지 관리
      • 1대1 메시지
      • 메시지 저장
      • 오프라인 푸시
      • 그룹 메시지
      • 메시지 포맷
    • 계정 시스템
      • 로그인 인증
      • 온라인 상태 관리
    • 그룹 관련
      • 그룹 시스템
      • 그룹 관리
    • 사용자 정보 및 관계망
      • 정보 관리
      • 관계망 관리
  • 구매 가이드
    • 과금 개요
    • 가격
  • 에러코드
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

개요

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(Android) or V2TIMManager(Conversation)(iOS and macOS). 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 (Android / iOS and macOS / Windows), 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 Premium 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.