• UIKit
  • SDK
  • 서버 API
Chat/
SDK/
Unity(Game Solution)/
메시지/
SDK
  • Run Demo
  • SDK 통합
  • 초기화
  • 로그인 및 로그아웃
  • 메시지
    • 메시지 개요
    • 메시지 보내기
    • 메시지 받기
    • 과거 메시지
    • 메시지 전달
    • 메시지 수정
    • 메시지 삭제
    • 메시지 비우기
    • 메시지 철회
    • 온라인 메시지
    • 읽음 확인
    • 메시지 조회
    • 그룹 @ 메시지
    • 지향적 그룹 메시지
    • 알림 음소거
    • 메시지 확장
  • 대화
    • 대화 개요
    • 대화 목록
    • 대화 획득
    • 읽지 않은 대화 수
    • 대화 최상단 고정
    • 대화 삭제
    • 대화 초안
    • 대화 마크
    • 대화 그룹
  • 그룹
    • 그룹 개요
    • 그룹 관리
    • 그룹 정보
    • 그룹 멤버 관리
    • 그룹 멤버 정보
    • 그룹 속성 사용자 정의
    • 그룹 카운터
  • 사용자
    • 사용자 정보
    • 사용자 상태
    • 친구 관리
    • 친구 목록
    • 블록리스트
  • Changelog
  • Guideline for Beginners
  • 콘솔 안내
    • 애플리케이션 생성 및 업그레이드
    • 기본 구성
    • 기능 구성
    • 계정 관리
    • 그룹 관리
    • 콜백 구성
  • 제품 소개
    • 메시지 관리
      • 1대1 메시지
      • 메시지 저장
      • 오프라인 푸시
      • 그룹 메시지
      • 메시지 포맷
    • 계정 시스템
      • 로그인 인증
      • 온라인 상태 관리
    • 그룹 관련
      • 그룹 시스템
      • 그룹 관리
    • 사용자 정보 및 관계망
      • 정보 관리
      • 관계망 관리
  • 구매 가이드
    • 과금 개요
    • 가격
  • 에러코드
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

메시지 개요

Message Class

In the Tencent Cloud Chat SDK, the message class is Message (details), which will be frequently used for message sending and receiving.

Meanings of Message Fields

Field
Description
message_elem_array
List of elements in the message
message_conv_id
Conversation ID of the message
message_conv_type
Conversation type of the message
message_sender
Message sender
message_priority
Message priority
message_client_time
Client time
message_server_time
Server time
message_is_from_self
Whether the message sender is the current user
message_platform
Platform from which the message is sent
message_is_read
Whether the message is read
message_is_online_msg
Whether the message is an online message. false (default): Ordinary message; true: Online message
message_is_peer_read
Whether the message is read by the recipient
message_need_read_receipt
Whether the message requires a read receipt (to use this feature, you need to purchase the Ultimate edition on v6.1 or later). To use this feature for group messages, go to the Chat console to set the target group type first.
message_status
Current status of the message
message_target_group_member_array
Specifies the targeted recipients of the group message (targeted message). This field is not supported for group @ messages, community messages, or audio-video group messages. After this field is set, the message will not be included in the unread message count of the conversation.
message_unique_id
Unique ID of the message. kTIMMsgMsgId is recommended.
message_msg_id
Unique message ID.
message_rand
Random code of the message
message_has_sent_receipt
Whether a read receipt is sent (valid only for group messages)
message_group_receipt_read_count
This field is an internal field and not recommended. We recommend you call TIMMsgGetMessageReadReceipts to get the read receipt for a group message.
message_group_receipt_unread_count
This field is an internal field and not recommended. We recommend you call TIMMsgGetMessageReadReceipts to get the read receipt for a group message.
message_seq
Sequence number of the message
message_custom_int
Custom integer field, which is saved locally, will not be sent to the peer end, and will become invalid after the application is uninstalled and reinstalled
message_custom_str
Custom data field, which is saved locally, will not be sent to the peer end, and will become invalid after the application is uninstalled and reinstalled
message_cloud_custom_str
Custom message data, which is saved in the cloud, will be sent to the peer end, and can still be pulled after the application is uninstalled and reinstalled
message_is_excluded_from_unread_count
Whether the message is excluded from the unread count of the conversation. NO (default): included in the unread count of the conversation; YES: excluded from the unread count of the conversation
message_is_forward_message
Whether the message is a forwarded message
message_group_at_user_array
List of UserIDs of users to be mentioned (@). To @all, pass in kImSDK_MesssageAtALL.
message_sender_profile
User profile of the message sender
message_sender_group_member_info
Information of the message sender in a group. This parameter is only valid in a group conversation. Currently, only the kTIMGroupMemberInfoIdentifier and kTIMGroupMemberInfoNameCard fields can be obtained. You are advised to obtain other fields via the TIMGroupGetMemberInfoList API.
message_offlie_push_config
Offline push settings of the message
message_excluded_from_last_message
Whether the message is used as the last message (lastMessage) in the conversation. true: No; false: Yes

Message Types

Chat messages are classified by message destination into two types: one-to-one messages (also called C2C messages) and group messages.
Message Type
API Keyword
Description
One-to-one message
C2CMessage
Also called C2C message. When sending a one-to-one message, you must specify the UserID of the message recipient, and only the recipient can receive this message.
Group message
GroupMessage
When sending a group message, you must specify the groupID of the target group, and all users in this group can receive this message.
Tencent Cloud Chat messages can also be classified by content into text messages, image messages, video messages, audio messages, file messages, location messages, combined messages, and group tip messages.
Message Type
API Keyword
Description
Text message
kTIMElem_Text
Ordinary text message
Custom message
kTIMElem_Custom
It is a section of binary buffer and often used to transfer custom signaling in your application.
Image message
kTIMElem_Image
When the Chat SDK sends an original image, it automatically generates two images in different sizes. The three images are called the original image, large image, and thumbnail.
Video message
kTIMElem_Video
A video message contains a video file and a thumbnail.
Audio message
kTIMElem_Sound
It supports displaying a red dot before the playback of the audio message.
File message
kTIMElem_File
A file message cannot exceed 100 MB.
Location message
kTIMElem_Location
A location message contains three fields: location description, longitude, and latitude.
Merged message
kTIMElem_Merge
Up to 300 messages can be combined.
Group tip
kTIMElem_GroupTips
A group tip is often used to carry a system notification in a group, such as a notification indicating that a member joins or leaves the group, the group description is modified, or the profile of a group member is changed.

Message Storage Policy

Tencent Cloud Chat messages can be classified by message storage policy into two types: online messages and non-online messages. Online messages can be received only by online users and will not be pushed when they are offline. Non-online messages can be received by users whether they are online or not.
Online messages are delivered in real time and not stored on the server or in the SDK. Therefore, they cannot be pulled from historical messages after the device is changed or the application is uninstalled and reinstalled.
Note:
1. All messages in an audio-video group are online messages.
2. Messages pushed to all users are online messages.
Non-online messages are stored in the SDK and on the server. By default, they are stored on the roaming server for seven days. If you want a longer storage period, you need to purchase the value-added service. For more information on the service content and billing, see Pricing.
These messages, for example, all types of ordinary messages, can be pulled from historical messages after the device is changed or the application is uninstalled and reinstalled.