TIMMsgGetGroupMessageReadMemberList

功能介绍

获取群消息已读或未读群成员列表

该功能需要购买旗舰版套餐包,购买 旗舰版套餐包 后可使用。

需要到控制台开启,且只支持Work、Public、Meeting群组。且不支持群定向消息。

参数详解

参数名称 参数类型 是否必填 描述
msgGetGroupMessageReadMembers MsgGetGroupMessageReadMembersParam 获取消息已读回执的参数

返回模板

Promise<commonResult<Array<GroupMemberInfo>>>

{
    code: TIMResult | TIMErrCode;
    desc?: string | undefined;
    json_param?: Array<GroupMemberInfo> | undefined;
    json_params?: Array<GroupMemberInfo> | undefined; // 兼容
    user_data?: string | undefined;
}

返回值详解

名称 数值类型 描述
code TIMResultTIMErrCode 返回状态码
desc string | undefined 返回描述
json_param Array< GroupMemberInfo > | undefined 根据具具体接口返回
json_params Array< GroupMemberInfo > | undefined 兼容的字段,某些情况下会返回这个,根据具体接口返回
user_data string | undefined ImSDK负责透传的用户自定义数据,未做任何处理

代码示例

import TimRender from "im_electron_sdk/dist/renderer";
const timRenderInstance = new TimRender();
import { Json_get_msg_param,MsgGetMsgListParams,MsgGetGroupMessageReadMembersParam } from "im_electron_sdk/dist/interfaces";

let convId = ""
let convType = 0
let msgParam:Json_get_msg_param = {
    msg_getmsglist_param_last_msg: '',  //选填
    msg_getmsglist_param_count: 0,  //选填
    msg_getmsglist_param_is_ramble: false,  //选填
    msg_getmsglist_param_is_forward: false,  //选填
    msg_getmsglist_param_last_msg_seq: 0,  //选填
    msg_getmsglist_param_time_begin: 0,  //选填
    msg_getmsglist_param_time_period: 0,  //选填
}

let param1 : MsgGetMsgListParams = {
    conv_id: convId,//必填
    conv_type: convType,//必填
    params: msgParam,//必填
    user_data:''  //选填
  }
const {code1,json_params} = await timRenderInstance.TIMMsgGetMsgList(param1)
if(code1 == 0){
    let param:MsgGetGroupMessageReadMembersParam = {
        json_msg: JSON.stringify(json_params[0]),//必填
        filter: 0,//必填
        next_seq: "",//必填
        count: 0,//必填
        user_data: ""//必填
    }
    const {code} = await timRenderInstance.TIMMsgGetGroupMessageReadMemberList(param); 
    if(code == 0){
        //获取成功
    }
}

results matching ""

    No results matching ""