TIMMsgGetGroupMessageReadMemberList

Introduction

Get group message read member list

To view the list of members who have or have not read a group message, the sender can call the TIMMsgGetGroupMessageReadMemberList to pull the member list by page.

Ultimate package only, Buy Ultimate package to enable it.

You can enable this ability on [IM Console].Only work, public and meeting type groups are supported.Group directed messages are not supported.

Parameter details

Parameter name Parameter type Required Description
msgGetGroupMessageReadMembers MsgGetGroupMessageReadMembersParam yes Param of getting group message read member list

Returned template

Promise<commonResult<Array<GroupMemberInfo>>>

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

Return value details

name type description
code TIMResultTIMErrCode Request result: Error codes. 0 means success.
desc string | undefined The description of the error. It will be empty if success.
json_param Array< GroupMemberInfo > | undefined Return value of calling API
json_params Array< GroupMemberInfo > | undefined Return value of calling API. Compatible field, which is returned in some cases.
user_data string | undefined ImSDK is responsible for transporting user-defined data without any processing

Code example

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: '',  // optional
    msg_getmsglist_param_count: 0,  // optional
    msg_getmsglist_param_is_ramble: false,  // optional
    msg_getmsglist_param_is_forward: false,  // optional
    msg_getmsglist_param_last_msg_seq: 0,  // optional
    msg_getmsglist_param_time_begin: 0,  // optional
    msg_getmsglist_param_time_period: 0,  // optional
}

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

results matching ""

    No results matching ""