SDKsuni-app / uni-app x
Accept a group application
Approve a pending request from a user to join a group.
Invoke acceptGroupApplication() as a group owner or administrator to approve a pending group join request.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group identifier. |
fromUserID | string | Yes | The applicant's user ID (matching userID in the application record). |
handleMsg | string | Yes | Approval 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.
Was this page helpful?