getBlackList

Introduction

Load the list of blocked users.

Parameter details

This API has no parameters

Returned template

V2TimValueCallback<V2TimFriendInfo[]>

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

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 V2TimFriendInfo[] The list of blocked users.

Code example

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


const getBlackListRes = await TencentImSDKPlugin.v2TIMManager
    .getFriendshipManager()
    .getBlackList();
if (getBlackListRes.code === 0) {

    getBlackListRes.data?.forEach((element) => {
        element.friendCustomInfo;
        element.friendGroups;
        element.friendRemark;
        element.userID;
        element.userProfile?.allowType;
        element.userProfile?.birthday;
        element.userProfile?.customInfo;
        element.userProfile?.faceUrl;
        element.userProfile?.gender;
        element.userProfile?.level;
        element.userProfile?.nickName;
        element.userProfile?.role;
        element.userProfile?.selfSignature;
        element.userProfile?.userID;
    });
}

results matching ""

    No results matching ""