开启相亲时仅房主和管理有选择主持人的公屏提示
This commit is contained in:
@@ -384,7 +384,21 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
} else if(content.eventType == NIMChatroomEventTypeInfoUpdated) {
|
||||
if (roomInfo.isCloseScreen) {return;}
|
||||
if (roomInfo.datingState == RoomDatingStateChangeType_Open) {
|
||||
[self addRoomMessage:message];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
request.roomId = roomId;
|
||||
request.userIds = @[uid];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
if (error == nil) {
|
||||
NIMChatroomMember * member = members.firstObject;
|
||||
BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||
BOOL isManager = member.type == NIMChatroomMemberTypeManager;
|
||||
if (isCreator || isManager) {
|
||||
[self addRoomMessage:message];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user