getFriendGroups

Introduction

Load the list of friend groups with detailed information.

  1. You can get the whole list of friend groups, by specifying null to groupNameList.

Parameter details

Parameter name Parameter type Required Description
groupNameList string[] yes The list of name of the groups that needs to get the detailed information.

Returned template

V2TimValueCallback<V2TimFriendGroup[]>

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

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 V2TimFriendGroup[] The list of friend groups result.

Code example

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


const getFriendGroupsRes = await TencentImSDKPlugin.v2TIMManager
    .getFriendshipManager()
    .getFriendGroups([]);
if (getFriendGroupsRes.code === 0) {

    getFriendGroupsRes.data?.forEach((element) => {
        element.friendCount;
        element.friendIDList;
        element.name;
    });
}

results matching ""

    No results matching ""