Merge pull request #6297 from vector-im/ismail/5731_room_header_invite

This commit is contained in:
ismailgulek
2022-06-17 15:55:34 +03:00
committed by GitHub
6 changed files with 19 additions and 6 deletions
@@ -738,6 +738,13 @@
return res;
}
- (BOOL)canInvitePeople
{
NSInteger requiredLevel = roomDataSource.roomState.powerLevels.invite;
NSInteger myLevel = [roomDataSource.roomState.powerLevels powerLevelOfUserWithUserID:roomDataSource.mxSession.myUserId];
return myLevel >= requiredLevel;
}
- (NSArray*)events
{
NSMutableArray* eventsArray;
@@ -112,6 +112,11 @@
*/
@property (nonatomic) BOOL shouldHideSenderInformation;
/**
Flag indicating whether the user can invite people in this room.
*/
@property (nonatomic, readonly) BOOL canInvitePeople;
/**
Tell whether this bubble has nothing to display (neither a message nor an attachment).
*/