Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FriendshipManager

Index

Friend callbacks

TIMSetFriendAddRequestCallback

  • brief

    Set the callback for friend requests.

    note

    If the logged-in user has set confirmation for friend requests and another user sends a friend request to this user, the logged-in user will receive the friend request callback, and the IM SDK will notify the developer using this callback. If the same account has logged in on multiple terminals, each terminal will receive the callback.

    Parameters

    Returns void

TIMSetFriendApplicationListDeletedCallback

TIMSetFriendApplicationListReadCallback

TIMSetFriendBlackListAddedCallback

TIMSetFriendBlackListDeletedCallback

TIMSetOnAddFriendCallback

  • brief

    Set the callback for adding friends

    note

    This callback is used for multi-terminal synchronization. For example, the same IM SDK account has logged in to devices A and B. When device A adds a friend, the IM SDK on device B will receive a friend addition notification, and the IM SDK will notify the developer using this callback.

    Parameters

    Returns void

TIMSetOnDeleteFriendCallback

  • brief

    Set the callback for deleting friends

    note

    This callback is used for multi-terminal synchronization. For example, the same IM SDK account has logged in to devices A and B. When device A adds a friend, the IM SDK on device B will receive a friend addition notification, and the IM SDK will notify the developer using this callback.

    Parameters

    Returns void

TIMSetUpdateFriendProfileCallback

  • brief

    Set the callback for updating friend profiles

    note

    This callback is used for multi-terminal synchronization. For example, the same IM SDK account has logged in to devices A and B. When device A updates a friend's profile, the IM SDK on device B will receive a friend profile update notification, and the IM SDK will notify the developer via this callback.

    Parameters

    Returns void

Other

getErrorResponse

  • getErrorResponse(params: ErrorResponse): { code: number; desc: string | String; json_params: string | String; user_data: string | String }
  • Parameters

    Returns { code: number; desc: string | String; json_params: string | String; user_data: string | String }

    • code: number
    • desc: string | String
    • json_params: string | String
    • user_data: string | String

getErrorResponseByCode

  • getErrorResponseByCode(code: number): { code: number; desc: string | String; json_params: string | String; user_data: string | String }
  • Parameters

    • code: number

    Returns { code: number; desc: string | String; json_params: string | String; user_data: string | String }

    • code: number
    • desc: string | String
    • json_params: string | String
    • user_data: string | String

Delete friends

TIMFriendshipDeleteFriend

Handle friend requests

TIMFriendshipHandleFriendAddRequest

  • brief

    Handle friend requests

    note

      If kTIMUserProfileAddPermission is set to kTIMProfileAddPermission_NeedConfirm in your profile, you will receive a friend request when someone adds you as a friend, and you can process the request through this API.

    Parameters

    Returns Promise<commonResponse>

Friend list APIs

TIMFriendshipCreateFriendGroup

TIMFriendshipGetFriendGroupList

TIMFriendshipModifyFriendGroup

Friend list APIs*

TIMFriendshipDeleteFriendGroup

Search for friends

TIMFriendshipSearchFriends

Update friends' profiles (such as remarks)

TIMFriendshipModifyFriendProfile

  • brief

    Update friends' profiles (such as remarks)

    note

    When using this API to modify the profile of a friend, see FriendProfileItem (in interface) for information about the fields that can be modified. You can modify multiple fields at a time. When modifying a custom field, you can add the prefix Tag_SNS_Custom_ to the entered key value. If you do not add this prefix, the SDK will automatically add this prefix.

    Parameters

    Returns Promise<commonResponse>

Pending information APIs

TIMFriendshipDeletePendency

TIMFriendshipGetPendencyList

TIMFriendshipReportPendencyReaded

Check the friend type

TIMFriendshipCheckFriendType

Add a friend

TIMFriendshipAddFriend

Get friend information

TIMFriendshipGetFriendsInfo

Get the friend list

TIMFriendshipGetFriendProfileList

  • brief

    Get the friend list

    note

    Friends information This interface returns all friends information through callbackFriendProfile.

    kTIMFriendProfileIdentifier          = "friend_profile_identifier";          // String. Read-only. UserID of the friend.
    kTIMFriendProfileGroupNameArray = "friend_profile_group_name_array"; // Array string. Read-only. List of friend list names.
    kTIMFriendProfileRemark = "friend_profile_remark"; // String. Read-only. Friend remarks, which is 96 bytes at most. This field is empty if the API is called to obtain your own profile.
    kTIMFriendProfileAddWording = "friend_profile_add_wording"; // String. Read-only. Friend request reason.
    kTIMFriendProfileAddSource = "friend_profile_add_source"; // String. Read-only. Friend request source.
    kTIMFriendProfileAddTime = "friend_profile_add_time"; // Number. Read-only. Time when the friend was added.
    kTIMFriendProfileUserProfile = "friend_profile_user_profile"; // Object, [UserProfile](../../interfaces/interface_friendshipinterface.userprofile.html). Read-only. Personal profile of the friend.
    kTIMFriendProfileCustomStringArray = "friend_profile_custom_string_array"; // Array, [FriendProfileCustemStringInfo](). Read-only. [Custom friend fields](https://cloud.tencent.com/document/product/269/1501#.E8.87.AA.E5.AE.9A.E4.B9.89.E5.A5.BD.E5.8F.8B.E5.AD.97.E6.AE.B5).

    Parameters

    Returns Promise<commonResponse>

    Promise

Blocklist APIs

TIMFriendshipAddToBlackList

TIMFriendshipDeleteFromBlackList

TIMFriendshipGetBlackList

Generated using TypeDoc