Skip to main content

addBlack

Feature Introduction

Explanation

Add the other party to the blacklist.

Note

This means the other party cannot send you messages, but you can send messages to them. Relevant Callback: onBlackAdded

Function Prototype


- (void)addToBlackList:(NSString *)userID
onSuccess:(OIMSuccessCallback)onSuccess
onFailure:(OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeMandatoryDescription
userIDNSStringYesUser ID

Return Result

Parameter NameParameter TypeDescription
onSuccessOIMSuccessCallbackSuccess Return
onFailureOIMFailureCallbackFailure Return

Code Example


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