getConversationListByConversaionIds

Introduction

Load the list of conversations with specific list of conversations ID.

Parameter details

Parameter name Parameter type Required Description
conversationIDList string[] yes The list of conversation IDs that needs to request for details,

Returned template

V2TimValueCallback<V2TimConversation[]>

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

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 V2TimConversation[] The list of conversations requested.

Code example

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


const getConversationListByConversaionIdsRes =
    await TencentImSDKPlugin.v2TIMManager
        .getConversationManager()
        .getConversationListByConversaionIds([]);
if (getConversationListByConversaionIdsRes.code === 0) {

    getConversationListByConversaionIdsRes.data?.forEach((element) => {
        element.conversationID;
        element.draftText;
        element.draftTimestamp;
        element.faceUrl;
        element.groupAtInfoList;
        element.groupID;
        element.groupType;
        element.isPinned;
        element.lastMessage;
        element.orderkey;
        element.recvOpt;
        element.showName;
        element.type;
        element.unreadCount;
        element.userID;
    });
}

results matching ""

    No results matching ""