SDKsiOS
Accept a group application
Accept an iOS group application.
Invoke acceptGroupApplication:fromUserId:handleMsg:onSuccess:onFailure: to approve a specified group application (restricted to group owners and administrators):
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | NSString * | Yes | Target group ID. |
fromUserId | NSString * | Yes | User ID of the applicant. |
handleMsg | NSString * | No | Approval remark or message. |
Code example
[[OIMManager manager] acceptGroupApplication:@"group_1001"
fromUserId:@"user_003"
handleMsg:@"Approved to join the project team"
onSuccess:^(NSString * _Nullable data) {
NSLog(@"acceptGroupApplication success");
}
onFailure:^(NSInteger code, NSString *message) {
NSLog(@"acceptGroupApplication failed: %ld %@", (long)code, message);
}];Return value
The onSuccess callback returns confirmation when the server accepts the approval.
State changes after the call
- Application status update: The application status change broadcasts via the
onGroupApplicationAccepted:listener callback. The client matches records bygroupID:userIDand updates the entry status to approved. - Member addition: Once the applicant successfully enters the group, the
onGroupMemberAdded:event is broadcast. The client adds the user into the local member cache matchinggroupID:userID. - Re-query calibration: For listener integration and list management, refer to Group applications overview and Group member queries overview.
Was this page helpful?