deleteFromFriendList

Introduction

Delete friends from contact.

It's recommended that the amount of IDs needs to be lower than 100 once, to avoid the refusing from IM Server, which limits the packet size to 1MB.

Parameter details

Parameter name Parameter type Required Platform Description
userIDList List< String > yes All The list of user IDs to remove from contact.
deleteType FriendTypeEnum yes All The type of deleting friends.

Returned template

V2TimValueCallback<List<V2TimFriendOperationResult>>

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

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< V2TimFriendOperationResult > The list of deleting operations results.

Code example

    V2TimValueCallback<List<V2TimFriendOperationResult>>
        deleteFromFriendListRes = await TencentImSDKPlugin.v2TIMManager
            .getFriendshipManager()
            .deleteFromFriendList(
      userIDList: [],
      deleteType: FriendTypeEnum.V2TIM_FRIEND_TYPE_BOTH,
    );
    if (deleteFromFriendListRes.code == 0) {
      deleteFromFriendListRes.data?.forEach((element) {
        element.resultCode;
        element.resultInfo;
        element.userID;
      });
    }

results matching ""

    No results matching ""