getGroupMessageReadMemberList

Introduction

Load the list of members who read or unread the specified group message.

This method only works with Ultimate Edition, you can find the pricing plan here.

Works only since version 3.9.3.

You have to enable and configure this features in console manually, before using it, while it works for Work, Public and Meeting group only.

Parameter details

Parameter name Parameter type Required Platform Description
messageID String yes All The message ID to query for.
filter GetGroupMessageReadMemberListFilter yes All The type of filter.
nextSeq int no All The sequence number to query.
count int no All The count to load once.

Returned template

V2TimValueCallback<V2TimGroupMessageReadMemberList>

{
    code : int
    desc : String
    data : {
        isFinished : bool
        memberInfoList : V2TimGroupMemberInfo
        nextSeq : int
    }
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the failure.
data [V2TimGroupMessageReadMemberList] The list of results.

Code example

    V2TimValueCallback<V2TimMsgCreateInfoResult> target =
        await TencentImSDKPlugin.v2TIMManager
            .getMessageManager()
            .createTextMessage(text: "test");
    String? groupTargetdId = target.data?.id;
    V2TimValueCallback<V2TimMessage> sendMessageRes =
        await TencentImSDKPlugin.v2TIMManager.getMessageManager().sendMessage(
            id: groupTargetdId!,
            receiver: "",
            needReadReceipt: true,
            groupID: "");
    V2TimValueCallback<List<V2TimMessageReceipt>> getMessageReadReceipts =
        await TencentImSDKPlugin.v2TIMManager
            .getMessageManager()
            .getMessageReadReceipts(
                messageIDList: [sendMessageRes.data!.msgID!]); 
    if (getMessageReadReceipts.code == 0) {
      getMessageReadReceipts.data?.forEach((element) {
        element.groupID; 
        element.msgID; 
        element.readCount; 
        element.timestamp;
        element.unreadCount; 
        element.userID; 
      });
    }
    V2TimValueCallback<V2TimGroupMessageReadMemberList>
        getGroupMessageReadMemberList = await TencentImSDKPlugin.v2TIMManager
            .getMessageManager()
            .getGroupMessageReadMemberList(
              nextSeq: 0, 
              count: 100, 
              messageID: sendMessageRes.data!.msgID!, 
              filter: GetGroupMessageReadMemberListFilter
                  .V2TIM_GROUP_MESSAGE_READ_MEMBERS_FILTER_UNREAD, 
            );
    if (getGroupMessageReadMemberList.code == 0) {
      getGroupMessageReadMemberList.data?.isFinished; 
      getGroupMessageReadMemberList.data?.memberInfoList; 
      getGroupMessageReadMemberList.data?.nextSeq; 
    }

results matching ""

    No results matching ""