getGroupMembersInfo

Introduction

Get the group members information for several specified users.

You are supposed to request for multiple users once to improve the performance, as this function supports batch acquisition.

Parameter details

Parameter name Parameter type Required Description
groupID string yes The group ID.
memberList string[] yes The list of members.

Returned template

V2TimValueCallback<V2TimGroupMemberFullInfo[]>

{
    code : number
    desc : string
    data : V2TimGroupMemberFullInfo[]// The list of members information returned.
}

Return value details

name type description
code number Request result: Error codes. 0 means success.
desc string The description of the error. It will be empty if success.
data V2TimGroupMemberFullInfo[] The list of members information returned.

Code example

import { TencentImSDKPlugin } from 'react-native-tim-js';


const getGroupMembersInfoRes = await TencentImSDKPlugin.v2TIMManager
    .getGroupManager()
    .getGroupMembersInfo(
        'groupID',
        []
    );
if (getGroupMembersInfoRes.code === 0) {

    getGroupMembersInfoRes.data?.forEach((element) => {
        element.customInfo;
        element.faceUrl;
        element.friendRemark;
        element.joinTime;
        element.muteUntil;
        element.nameCard;
        element.nickName;
        element.role;
        element.userID;
    });
}

results matching ""

    No results matching ""