getTopicInfoList

Introduction

Load the topic info list.

Community group only works with Ultimate Edition, you can see the pricing plan here.

It will returns all the topics if topicIDList is empty.

It will only returns the specified topics if topicIDList is not empty.

Parameter details

Parameter name Parameter type Required Description
groupID string yes The group ID(Community ID) of those topics.
topicIDList string[] yes The specified topic ID list.

Returned template

V2TimValueCallback<V2TimTopicInfoResult[]>

{
    code : number
    desc : string
    data : V2TimTopicInfoResult[]// The list of topic infos.
}

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 V2TimTopicInfoResult[] The list of topic infos.

Code example

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


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

    getTopicInfoListoRes.data?.forEach((element) => {
        element.errorCode;
        element.errorMessage;
        element.topicInfo?.customString;
        element.topicInfo?.draftText;
        element.topicInfo?.groupAtInfoList;
        element.topicInfo?.introduction;
        element.topicInfo?.isAllMute;
        element.topicInfo?.lastMessage;
        element.topicInfo?.notification;
        element.topicInfo?.recvOpt;
        element.topicInfo?.selfMuteTime;
        element.topicInfo?.topicFaceUrl;
        element.topicInfo?.topicID;
        element.topicInfo?.unreadCount;
    });
}

results matching ""

    No results matching ""