checkFriend

Introduction

Check the relationship between current user and specific users.

Parameter details

Parameter name Parameter type Required Platform Description
userIDList List< String > yes All The list of users that needs checking.
checkType FriendTypeEnum yes All The type of checking.

Returned template

V2TimValueCallback<List<V2TimFriendCheckResult>>

{
    code : int
    desc : String
    data : List<V2TimFriendCheckResult>
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the error. It will be empty if success.
data List< V2TimFriendCheckResult > The list of checking results.

Code example

    V2TimValueCallback<List<V2TimFriendCheckResult>> checkFriendRes =
        await TencentImSDKPlugin.v2TIMManager
            .getFriendshipManager()
            .checkFriend(
      userIDList: [],
      checkType: FriendTypeEnum.V2TIM_FRIEND_TYPE_BOTH,
    );
    if (checkFriendRes.code == 0) {
      checkFriendRes.data?.forEach((element) {
        element.resultCode;
        element.resultInfo;
        element.resultType;
        element.userID;
      });
    }

results matching ""

    No results matching ""