Browse SDKs · React Native
Platform
SDKsReact NativeEnterprise

Delete friend requests

Batch remove friend request historical records from the application list using the OpenIM React Native SDK.

Copy

Batch remove friend application records from the local history list:

await OpenIMSDK.deleteFriendRequests([
  { fromUserID, toUserID },
]);

Parameters

Accepts an array of application target descriptors:

ParameterTypeRequiredDescription
fromUserIDstringYesUser ID of the applicant who initiated the friend request.
toUserIDstringYesUser ID of the recipient of the friend request.

Return value

A resolved Promise confirms that the designated friend application records were deleted.

Deleting an application record does not reject the request or affect existing friendships. Deletion triggers the OnFriendApplicationDeleted event. Remove items from the local friend application list using the composite key fromUserID:toUserID. For event listeners, see Get received friend applications.