SDKsReact Native
Accept a friend application
Accept a friend request with the OpenIM React Native SDK.
Call acceptFriendApplication() to accept a friend request.
await OpenIMSDK.acceptFriendApplication({
toUserID: applicantUserID,
handleMsg: '',
});Parameter description
| Parameter | Type | Required | Description |
|---|---|---|---|
toUserID | string | Yes | User ID of the applicant. |
handleMsg | string | Yes | Message attached when handling the request. Pass an empty string when there is no message. |
Accepting the request establishes a friendship and emits friend-request status changes and OnFriendAdded. See Get the friend list for the friend-list listener.
Was this page helpful?