Skip to main content

kickGroupMember

Feature Introduction

Description

Remove a member from a group.

Note

(1) Group owners and administrators can remove regular members. The group owner can remove both administrators and regular members.

Related Callbacks: onJoinedGroupDeleted onGroupMemberDeleted

Function Prototype


- (void)kickGroupMember:(NSString *)groupID
reason:(NSString * _Nullable)reason
uids:(NSArray *)usersID
onSuccess:(nullable OIMSimpleResultsCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeMandatoryDescription
groupIDNSStringYesGroup ID
reasonNSStingNoReason for removal
usersIDNSArray<NSString *>YesList of userIDs to kick

Return Results

Parameter NameParameter TypeDescription
onSuccessOIMSimpleResultInfoSuccessful return
onFailureOIMFailureCallbackFailed return

OIMSimpleResultInfo

Field NameField TypeDescription
userIDNSStringUser ID
resultNSIntegerExecution result

Code Example


[OIMManager.manager kickGroupMember:@""
reason:@""
uids:@[@""]
onSuccess:^(NSArray<OIMSimpleResultInfo *> * _Nullable results) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];