Add a friend without consent. The recipient will receive a system notification of type = 'addFriend', and the from field is the account ID of the requster, and the field to is the account ID of the recipient
The account to be added as a friend
Additional message in JSON string.
Send a friend request for approval The recipient will receive a system notification of type = 'applyFriend'. The recipient can choose to passFriendApply, or rejectFriendApply
passFriendApply.rejectFriendApply.Additional message in JSON string.
Delete a friend. The recipient will receive a system message of type = 'deleteFriend'. The from field of this system notification is the account that deletes the friend account and the to field is the ID of the deleted account.
Whether to delete the alias of a friend account.
If you set syncFriends to false when initializing the SDK, the onfriends callback will not be triggered. In this case, this interface can obtain the friend list
Note: Since the upper limit of the number of friends after v8.9.0 becomes 10,000, the remote protocol does not allow the SDK to send 10,000 friends in one go. There are two ways to get all friends at a time:
If a database is used, this interface will return all valid friend records in the database with updateTime > options.updateTime
If a database is not used, this interface with a timestamp argument will get 3000 records of updateTime > options.timetag from the server. Please handle the pagination logic on your own.
Timestamp, default value: 0. Get 3000 friends in ascending order whose update time is greater than this timestamp.
Check if the user is included in the friend list
Note: This interface requires database support. If the local database is not enabled, the done callback will return false
Accept a friend request. When the function is invoked,
Reject a friend request. When the function is invoked,
Update the alias and extension fields for friends. The logged in clients get notified by onsyncfriendaction.
Alias
Extension field, optional, You can also use JSON string for the field.
Friends APIs