Browse SDKs · React Native
SDKsReact Native

Delete a friend

Delete a friend with the OpenIM React Native SDK.

Copy

Call deleteFriend() to delete the friendship between the current user and a specified user.

await OpenIMSDK.deleteFriend(friendUserID);

friendUserID is the user ID of the friend to delete. After the friend is deleted, OnFriendDeleted is emitted with the deleted friend's information. See Get the friend list for the listener example.