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

읽음 확인

Feature Description

If a message sender wants to know who has or has not read the message, the sender needs to enable the message read receipt feature. After this feature is enabled, the sender can set whether a message requires a read receipt when sending the message; if yes, the sender will receive a receipt after the message is read by the receiver.
Read receipts are supported for both one-to-one and group messages in the same way.
Note:
To use this feature, you need to purchase the Ultimate edition plan.

Message Read Receipt

Specifying a group type for which to support message read receipts

Log in to the IM console, select Feature Configuration > Login and Message > Group Message Read Receipts, and specify the target Group type:

Specifying that a message requires a read receipt (by the sender)

After creating a message, the sender specifies that the message requires a read receipt through the needReadReceipt field in V2TimMessage (Details) and then sends the message to the conversation.
Below is the sample code:
const data = 'Typing...';
const createCustomMessageRes =
await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.createCustomMessage(data);
// Set `needReadReceipt` to `true` when sending the message
TencentImSDKPlugin.v2TIMManager.getMessageManager().sendMessage(id: createCustomMessageRes.data.id, receiver: "", groupID: "groupID",onlineUserOnly: true,needReadReceipt: true);

Sending a message read receipt (by the receiver)

After receiving the message, the receiver determines whether the message requires a read receipt based on the needReadReceipt field in V2TIMMessage (Details). If yes, after the user reads the message, the receiver calls the sendMessageReadReceipts API (Details) to send a read receipt.
Below is the sample code:
const sendMessageReadReceipts = await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.sendMessageReadReceipts(["msgids"]);
if (sendMessageReadReceipts.code == 0) {
// Succeeded
} else {
// Failed
}

Listening for a message read receipt notification (by the sender)

After the receiver sends a message read receipt, the sender can listen for a receipt notification through the onRecvMessageReadReceipts callback (Details) of V2TimAdvancedMsgListener and update the UI based on the notification to display the message as, for example, "Read by two members".
Below is the sample code:
onRecvMessageReadReceipts: (receiptList) {
receiptList.forEach((element) {
element.groupID; // Group ID
element.msgID; // Message ID
element.readCount;// Latest read count of the group message
element.unreadCount;// Latest unread count of the group message
element.userID; // ID of the other party of the one-to-one message
});
},

Pulling message read receipt information (by the sender)

After entering the message list, the sender pulls historical messages first, and then calls the getMessageReadReceipts API (Details) to pull the message read receipt information.
The V2TimessageReceipt field of the message read receipt is as described below:
Attribute
Description
Remarks
msgID
Message ID
Unique message ID
userID
ID of the receiver
If the message is a one-to-one message, this field indicates the ID of the receiver.
timestamp
Time when the receiver marks the message as read
This field is invalid when a message is read. If the message is a one-to-one message, when the receiver calls the markC2CMessageAsRead API to mark the message as read, the sender will receive the onRecvC2CReadReceipt callback which contains the timestamp information.
groupID
Group ID
If the message is a group message, this field indicates the group ID.
readCount
Number of members who have read the group message
If the message is a group message, this field indicates the number of members who have read the message.
unreadCount
Number of members who have not read the group message
If the message is a group message, this field indicates the number of members who have not read the message.
Below is the sample code:
const getMessageReadReceipts = await TencentImSDKPlugin.v2TIMManager.getMessageManager().getMessageReadReceipts([]);
if(getMessageReadReceipts.code == 0){
getMessageReadReceipts.data.forEach((element) {
// Parse the group message read receipt
element.groupID;
element.msgID;
element.readCount;
element.timestamp;
element.unreadCount;
element.userID;
});
}

Pulling the list of members who have or have not read a group message (by the sender)

To view the list of members who have or have not read a group message, the sender can call the getGroupMessageReadMemberList API (Details) to pull the member list by page.
const messageID = "";
const filter =
GetGroupMessageReadMemberListFilter.V2TIM_GROUP_MESSAGE_READ_MEMBERS_FILTER_READ;
const getGroupMessageReadMemberList = await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.getGroupMessageReadMemberList(messageID, filter);

if (getGroupMessageReadMemberList.code == 0) {
// Get the list of members who have or have not read the group message
getGroupMessageReadMemberList.data.isFinished;
getGroupMessageReadMemberList.data.memberInfoList;
getGroupMessageReadMemberList.data.nextSeq;
}