add Friend
Add Friend
Parameters
The user ID of the user to be added as a friend.
The direction type of the friend relationship: bidirectional friend. Refer to DirectionType.
Additional information. Optional, extra information sent with the friend request, limited to 128 characters.
The callback that returns the result after the operation is completed. Description of the onSuccess parameter in the callback:- When the friend addition permission of the other party requires consent, IRongCoreEnum.CoreErrorCode returns RC_FRIEND_NEED_ACCEPT(25461), indicating that the other party needs to agree before being added as a friend.- When the friend addition permission of the other party does not require consent, IRongCoreEnum.CoreErrorCode returns SUCCESS(0), indicating that the friend is added directly. Both parties will receive the onFriendAdd callback for the friend addition event.