Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett committed Sep 29, 2024
1 parent 771c1ac commit 60f0f5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions OpenIMSDK/Interface/OIMManager+Friend.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)getSpecifiedFriendsInfo:(NSArray <NSString *> *)usersID
filterBlack:(BOOL)filterBlack
onSuccess:(nullable OIMPublicUsersInfoCallback)onSuccess
onSuccess:(nullable OIMFriendsInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

/**
* Get information for all friends
*/
- (void)getFriendListWithFilterBlack:(BOOL)filterBlack
onSuccess:(nullable OIMPublicUsersInfoCallback)onSuccess
onSuccess:(nullable OIMFriendsInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

- (void)getFriendListPageWithOffset:(NSInteger)offset
count:(NSInteger)count
filterBlack:(BOOL)filterBlack
onSuccess:(nullable OIMPublicUsersInfoCallback)onSuccess
onSuccess:(nullable OIMFriendsInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

/**
Expand Down
12 changes: 6 additions & 6 deletions OpenIMSDK/Interface/OIMManager+Friend.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,24 @@ - (void)removeFromBlackList:(NSString *)userID

- (void)getSpecifiedFriendsInfo:(NSArray <NSString *> *)usersID
filterBlack:(BOOL)filterBlack
onSuccess:(nullable OIMPublicUsersInfoCallback)onSuccess
onSuccess:(nullable OIMFriendsInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure {
CallbackProxy *callback = [[CallbackProxy alloc]initWithOnSuccess:^(NSString * _Nullable data) {
if (onSuccess) {
onSuccess([OIMPublicUserInfo mj_objectArrayWithKeyValuesArray:data]);
onSuccess([OIMFriendInfo mj_objectArrayWithKeyValuesArray:data]);
}
} onFailure:onFailure];

Open_im_sdkGetSpecifiedFriendsInfo(callback, [self operationId], usersID.mj_JSONString, filterBlack);
}

- (void)getFriendListWithFilterBlack:(BOOL)filterBlack
onSuccess:(nullable OIMPublicUsersInfoCallback)onSuccess
onSuccess:(nullable OIMFriendsInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure {

CallbackProxy *callback = [[CallbackProxy alloc]initWithOnSuccess:^(NSString * _Nullable data) {
if (onSuccess) {
onSuccess([OIMPublicUserInfo mj_objectArrayWithKeyValuesArray:data]);
onSuccess([OIMFriendInfo mj_objectArrayWithKeyValuesArray:data]);
}
} onFailure:onFailure];

Expand All @@ -127,11 +127,11 @@ - (void)getFriendListWithFilterBlack:(BOOL)filterBlack
- (void)getFriendListPageWithOffset:(NSInteger)offset
count:(NSInteger)count
filterBlack:(BOOL)filterBlack
onSuccess:(OIMPublicUsersInfoCallback)onSuccess
onSuccess:(OIMFriendsInfoCallback)onSuccess
onFailure:(OIMFailureCallback)onFailure {
CallbackProxy *callback = [[CallbackProxy alloc]initWithOnSuccess:^(NSString * _Nullable data) {
if (onSuccess) {
onSuccess([OIMPublicUserInfo mj_objectArrayWithKeyValuesArray:data]);
onSuccess([OIMFriendInfo mj_objectArrayWithKeyValuesArray:data]);
}
} onFailure:onFailure];

Expand Down

0 comments on commit 60f0f5c

Please sign in to comment.