房间设置-被拉黑之后在进入房间没有提示
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
[[self getView] initEnterRoomSuccess:room user:user];
|
||||
return nil;
|
||||
}] subscribeError:^(NSError * _Nullable error) {
|
||||
[[self getView] enterRoomFail];
|
||||
[[self getView] enterRoomFail:error.code];
|
||||
}];
|
||||
|
||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
[[NIMSDK sharedSDK].chatroomManager enterChatroom:request completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom, NIMChatroomMember * _Nullable me) {
|
||||
if (error) {
|
||||
[[self getView] enterRoomFail];
|
||||
[[self getView] enterRoomFail:error.code];
|
||||
} else {
|
||||
[[self getView] enterRoomSuccess:chatroom];
|
||||
}
|
||||
@@ -118,7 +118,7 @@
|
||||
RoomInfoModel * infoModel = [RoomInfoModel modelWithJSON:data.data];
|
||||
[[self getView] openRoomSuccess:infoModel];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] enterRoomFail];
|
||||
[[self getView] enterRoomFail:code];
|
||||
} showLoading:YES] title:title type:type roomPwd:roomPwd roomDesc:roomDesc backPic:backPic uid:uid ticket:ticket];
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
///进入房间成功
|
||||
- (void)enterRoomSuccess:(NIMChatroom *)chatRoom;
|
||||
///进入房间失败(当前获取用户信息、获取房间信息、开启房间、进入云信房间失败,均会导致进房失败)
|
||||
- (void)enterRoomFail;
|
||||
- (void)enterRoomFail:(NSInteger)code;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -260,7 +260,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||
} else { // 当前用户进入别人房间
|
||||
// TODO: 房主已经下线。
|
||||
[self showSuccessToast:@"房主已下线"];
|
||||
[self enterRoomFail];
|
||||
[self enterRoomFail:0];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,10 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||
[self.stageView onRoomEntered];
|
||||
}
|
||||
|
||||
- (void)enterRoomFail {
|
||||
- (void)enterRoomFail:(NSInteger)code {
|
||||
if (code == 13003) {
|
||||
[self showErrorToast:@"您已被管理员拉黑"];
|
||||
}
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
@@ -496,13 +499,13 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||
[self.menuContainerView onRoomEntered];
|
||||
[self.presenter enterNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId] user:self.userInfo];
|
||||
} else {
|
||||
[self enterRoomFail];
|
||||
[self enterRoomFail:0];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didClickCancel:(RoomSettingInputType)type {
|
||||
if (type == RoomSettingInputType_Input_Pwd) {
|
||||
[self enterRoomFail];
|
||||
[self enterRoomFail:0];
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user