getGroupMessageReadMemberList
功能介绍
获取群消息已读或未读群成员列表
该功能需要购买旗舰版套餐包,购买 旗舰版套餐包 后可使用。
3.9.3及以上版本支持
需要到控制台开启,且只支持Work、Public、Meeting群组。且不支持群定向消息。
参数详解
返回模板
V2TimValueCallback<V2TimGroupMessageReadMemberList>
{
code : int
desc : String
data : {
isFinished : bool
memberInfoList : V2TimGroupMemberInfo
nextSeq : int
}
}
返回值详解
名称 |
数值类型 |
描述 |
code |
int |
请求结果错误码 |
desc |
String |
请求结果描述 |
data |
[V2TimGroupMessageReadMemberList] |
群消息已读或未读群成员列表 |
代码示例
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;
}