getJoinedGroupList

Introduction

Load the list of joined groups.

Do not works for AVChatRoom and Community.

The call rate of this method is 10 times a second, limited by SDK, error code of 7008 (ERR_SDK_COMM_API_CALL_FREQUENCY_LIMIT) will be provided if exceed.

Inactivated Work groups can not be found in this method, activating them by sending a message to the groups.

Parameter details

This API has no parameters

Returned template

V2TimValueCallback<V2TimGroupInfo[]>

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

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 V2TimGroupInfo[] The list of groups.

Code example

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


const getJoinedGroupListRes = await TencentImSDKPlugin.v2TIMManager
    .getGroupManager()
    .getJoinedGroupList();
if (getJoinedGroupListRes.code == 0) {

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

results matching ""

    No results matching ""