Browse SDKs · uni-app / uni-app x
Platform
SDKsuni-app / uni-app x

Reject a group application

Decline a pending request from a user to join a group.

Copy

Invoke refuseGroupApplication() as a group owner or administrator to decline a pending group join request.

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group identifier.
fromUserIDstringYesThe applicant's user ID (matching userID in the application record).
handleMsgstringYesRejection comment or explanation; pass an empty string if omitted.

Code example

import { refuseGroupApplication } from '@/uni_modules/unix-openim-sdk'

await refuseGroupApplication({
  groupID: application.groupID,
  fromUserID: application.userID,
  handleMsg: 'Application declined at this time',
})

Return value

The Promise resolves with void once OpenIMServer processes the rejection.

State changes after the call

A resolved Promise confirms that the rejection was accepted by OpenIMServer. When onGroupApplicationRejected fires, update the review status of the application record matching groupID:userID. Rejecting a request does not remove the application log from history. For complete event registration logic, see Get received group applications.