修复了平台超管进房没有公屏
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
extModel.enterRoomEffects = userInfo.userVipInfoVO.enterRoomEffects;
|
||||
extModel.gender = userInfo.gender;
|
||||
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
extModel.platformRole = userInfo.platformRole;
|
||||
|
||||
NSMutableDictionary *ext = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]];
|
||||
request.roomExt = [ext toJSONString];
|
||||
|
@@ -52,6 +52,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, assign) GenderType gender;
|
||||
///是否符合渠道打招呼
|
||||
@property (nonatomic,assign) BOOL fromSayHelloChannel;
|
||||
/// 0 普通 1超管
|
||||
@property (nonatomic,assign) NSInteger platformRole;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -273,7 +273,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
NIMMessageChatroomExtension * messageExt = (NIMMessageChatroomExtension *)message.messageExt;
|
||||
NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from];
|
||||
XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithJSON:dic];
|
||||
return extModel.enterHide;
|
||||
return (extModel.enterHide || extModel.platformRole == 1);
|
||||
}
|
||||
|
||||
#pragma mark - 添加数据并且做自动滚动
|
||||
|
@@ -159,6 +159,7 @@
|
||||
|
||||
[[self loadChatRoomTmpMemberList] subscribeNext:^(id _Nullable x) {
|
||||
NSArray * tmpList = x;
|
||||
|
||||
[self.datasource addObjectsFromArray:tmpList];
|
||||
[self.tableView reloadData];
|
||||
self.refreshing = NO;
|
||||
@@ -242,7 +243,16 @@
|
||||
}
|
||||
NSMutableArray * array = [NSMutableArray array];
|
||||
[members enumerateObjectsUsingBlock:^(NIMChatroomMember * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.isOnline && !obj.isInBlackList) {
|
||||
BOOL isSuperAmind = NO;
|
||||
if (obj.roomExt.length > 0) {
|
||||
NSData *jsonData = [obj.roomExt dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSError *error;
|
||||
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
|
||||
XPMessageRemoteExtModel * model = [XPMessageRemoteExtModel modelWithDictionary:[dic objectForKey:obj.userId]];
|
||||
isSuperAmind = model.platformRole == 1;
|
||||
}
|
||||
|
||||
if (obj.isOnline && !obj.isInBlackList && !isSuperAmind) {
|
||||
[array addObject:obj];
|
||||
}
|
||||
}];
|
||||
|
@@ -1095,7 +1095,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
}
|
||||
break;
|
||||
case NIMChatroomEventTypeEnter:
|
||||
if (content.source.userId.integerValue != [AccountInfoStorage instance].getUid.integerValue) {
|
||||
if (content.source.userId.integerValue != [AccountInfoStorage instance].getUid.integerValue && self.userInfo.platformRole != 1) {
|
||||
onLineNumber += 1;
|
||||
}else {///如果是自己的话 如果有坐骑的话
|
||||
[self userEnterRoomSuccess];
|
||||
|
Reference in New Issue
Block a user