room_photo_selection

rename isSuperUser to isModerator
This commit is contained in:
yannick
2015-12-17 11:56:06 +01:00
parent e2cf0564eb
commit 6cafd37dbf
3 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -27,9 +27,9 @@
@property(nonatomic, readonly) BOOL areRoomNotificationsMuted;
/**
Returns YES if the oneself user is a super user i.e. he is allowed to modify the room members and so on.
Returns YES if the oneself user is a moderator i.e. he is allowed to update the room name or the avatar..
*/
@property(nonatomic, readonly) BOOL isSuperUser;
@property(nonatomic, readonly) BOOL isModerator;
/**
Returns the vector displayname.
+3 -2
View File
@@ -74,10 +74,11 @@
return NO;
}
- (BOOL)isSuperUser
- (BOOL)isModerator
{
// Check whether the user has enough power to rename the room
// Check whether the user has enough power to rename the room or update the avatar
MXRoomPowerLevels *powerLevels = [self.state powerLevels];
NSUInteger userPowerLevel = [powerLevels powerLevelOfUserWithUserID:self.mxSession.myUser.userId];
return (userPowerLevel >= [powerLevels minimumPowerLevelForSendingEventAsStateEvent:kMXEventTypeStringRoomName]);