Skip to main content

transferGroupOwner

Function Introduction

Description

Transfer the group owner status.

Note

(1) Each group can only have one owner. (2) The caller must be the current group owner.

Related Callbacks: onGroupInfoChanged onGroupMemberInfoChanged

Function Prototype


- (void)transferGroupOwner:(NSString *)groupID
newOwner:(NSString *)userID
onSuccess:(nullable OIMSuccessCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameData TypeRequiredDescription
groupIDNSStringYesGroup ID
userIDNSStingNoNew owner's User ID

Return Result

Parameter NameData TypeDescription
onSuccessOIMSuccessCallbackSuccessful return
onFailureOIMFailureCallbackFailure return

Code Example


[OIMManager.manager transferGroupOwner:@""
newOwner:@""
onSuccess:^(NSString * _Nullable data) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];