mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-13 19:30:00 +02:00
room_photo_selection
rename isSuperUser to isModerator
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user