SDKsReact Native
Delete a friend
Remove a friendship relation with a specified user using the OpenIM React Native SDK.
Remove an established friendship between the authenticated user and a specified friend:
await OpenIMSDK.deleteFriend(friendUserID);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
friendUserID | string | Yes | Target friend's user ID to delete. |
Return value
A resolved Promise confirms that the friendship has been dissolved on the server.
Both users' clients receive the OnFriendDeleted event. Remove the friend entry keyed by userID from your local friend cache. For full event listeners, see Get friend list by page.
Was this page helpful?