Browse SDKs · WASM
SDKsWASM

Delete a friend

Delete the friendship between the current user and a selected user.

Copy
await openimsdk.deleteFriend(friendUserID);

friendUserID is the user ID of the friend to delete.

A successful Promise means that the friendship deletion request has completed. You can end the submission state, but reconcile the friend list and profile card through OnFriendDeleted or a new query. The event removes the record by userID; see Get the friend list for the complete listener.