Skip to main content

subscribeUsersStatus

Description

info

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

Note

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

Related Callbacks:
onUserStatusChanged

Function Prototype


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

Input Parameters

Parameter NameParameter TypeRequiredDescription
userIDsNSArray<NSString *>YesUser ID list

Return Result

Parameter NameParameter TypeDescription
onSuccessNSArray<OIMUserStatusInfo >Success return
onFailureOIMFailureCallbackFailure return

Code Example


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

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

}];