Browse SDKs · WASM
SDKsWASMEnterprise

Delete friend applications

Delete friend application records in batches.

Copy

deleteFriendRequests() deletes records in batches by applicant and recipient pairs.

Parameters

The method accepts an array directly. Each array item uses the following fields:

ParameterTypeRequiredDescription
items[].fromUserIDstringYesUser ID of the applicant.
items[].toUserIDstringYesUser ID of the application recipient.
await openimsdk.deleteFriendRequests([{ fromUserID, toUserID }]);

Deleting a record is not the same as rejecting an application, and it does not delete an existing friendship. A successful Promise means that the deletion request has completed. OnFriendApplicationDeleted may arrive afterward; remove the record by fromUserID:toUserID. See Get received friend applications for the complete listener.