getGroupsInfo

Introduction

Get the information of the list of groups.

This method supports batch requests for multiple groups.

Parameter details

Parameter name Parameter type Required Description
groupIDList string[] yes The group ID list.

Returned template

V2TimValueCallback<V2TimGroupInfoResult[]>

{
    code : number
    desc : string
    data : V2TimGroupInfoResult[]
}

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 V2TimGroupInfoResult[] The list of group information returned.

Code example

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


const getGroupsInfoRes = await TencentImSDKPlugin.v2TIMManager
    .getGroupManager()
    .getGroupsInfo([]);
if (getGroupsInfoRes.code == 0) {

    getGroupsInfoRes.data?.forEach((element) => {
        element.resultCode;
        element.resultMessage;
        element.groupInfo?.createTime;
        element.groupInfo?.customInfo;
        element.groupInfo?.faceUrl;
        element.groupInfo?.groupAddOpt;
        element.groupInfo?.groupID;
        element.groupInfo?.groupName;
        element.groupInfo?.groupType;
        element.groupInfo?.introduction;
        element.groupInfo?.isAllMuted;
        element.groupInfo?.isSupportTopic;
        element.groupInfo?.joinTime;
        element.groupInfo?.lastInfoTime;
        element.groupInfo?.lastMessageTime;
        element.groupInfo?.memberCount;
        element.groupInfo?.notification;
        element.groupInfo?.onlineCount;
        element.groupInfo?.owner;
        element.groupInfo?.recvOpt;
        element.groupInfo?.role;
    });
}

results matching ""

    No results matching ""