Skip to main content

subscribeUsersStatus

Feature Introduction

Description

Subscribe to the online status of specified users and return the online status of these users.

Note

The number of subscriptions per user cannot exceed 3000. If it exceeds, they will be eliminated based on the subscription time.

Related Callback: onUserStatusChanged

Function Prototype


- (void)subscribeUsersStatus:(NSArray<NSString *> *)userIDs
onSuccess:(nullable OIMUserStatusInfosCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeMandatoryDescription
userIDsNSArray<NSString *>YesList of user IDs

Return Results

Parameter NameParameter TypeDescription
onSuccessNSArray<OIMUserStatusInfo >Successful return
onFailureOIMFailureCallbackFailed return

Code Example


[OIMManager.manager subscribeUsersStatus:@[]
onSuccess:^(NSArray<OIMUserStatusInfo *> * _Nullable statusInfos) {

} onFailure:^(NSInteger code, NSString * _Nullable msg) {

}];