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

Accept a group application

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

Copy

Invoke acceptGroupApplication() as a group owner or administrator to approve a pending group join request.

Parameters

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

Code example

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

await acceptGroupApplication({
  groupID: application.groupID,
  fromUserID: application.userID,
  handleMsg: 'Approved',
})

Return value

The Promise resolves with void once OpenIMServer processes the approval.

State changes after the call

A resolved Promise confirms that the approval was accepted by the server. Do not construct member records manually based on Promise resolution. When onGroupApplicationAccepted fires, update the review status of the application record matching groupID:userID. When the member officially enters the group, onGroupMemberAdded arrives to update the active member roster. For complete event registration logic, see Get received group applications.