Delete friend-request records
Commercially delete selected friend-request records in a batch.
deleteFriendRequests() is Commercial.
Parameters
The operation receives OpenIMDeleteFriendRequestsParams. Every item in friendRequests contains:
| Parameter | Type | Required | Description |
|---|---|---|---|
friendRequests[].fromUserID | string | Yes | User ID of the applicant. |
friendRequests[].toUserID | string | Yes | User ID of the recipient. |
import { deleteFriendRequests } from '@/uni_modules/unix-openim-sdk'
await deleteFriendRequests({
friendRequests: [
{ fromUserID: 'user_a', toUserID: 'user_b' },
],
})Each OpenIMSimpleFriendRequest identifies an exact request by fromUserID:toUserID. Deleting request history is not the same as rejecting an application and does not remove an established friendship. Use the friend deletion API to end a friendship.
Promise success means that the deletion request completed. onFriendApplicationDeleted can arrive afterward; the complete listener is on Get received friend applications, where records are removed by fromUserID:toUserID.
Confirm batch targets in the UI. After failure, do not assume that every or no item was deleted; requery both received and sent application lists to reconcile with the server snapshot.
Was this page helpful?