diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 6adee1f2a..c5a94ded1 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -519,10 +519,12 @@ Tap the + to start adding people."; "room_participants_security_information_room_encrypted" = "Messages in this room are end-to-end encrypted.\n\nYour messages are secured with locks and only you and the recipient have the unique keys to unlock them."; "room_participants_security_information_room_encrypted_for_dm" = "Messages here are end-to-end encrypted.\n\nYour messages are secured with locks and only you and the recipient have the unique keys to unlock them."; +"room_member_power_level_owner_in" = "Owner in %@"; "room_member_power_level_admin_in" = "Admin in %@"; "room_member_power_level_moderator_in" = "Moderator in %@"; "room_member_power_level_custom_in" = "Custom (%@) in %@"; +"room_member_power_level_short_owner" = "Owner"; "room_member_power_level_short_admin" = "Admin"; "room_member_power_level_short_moderator" = "Mod"; "room_member_power_level_short_custom" = "Custom"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index d4dc0d142..790cbb1af 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -6155,6 +6155,10 @@ public class VectorL10n: NSObject { public static func roomMemberPowerLevelModeratorIn(_ p1: String) -> String { return VectorL10n.tr("Vector", "room_member_power_level_moderator_in", p1) } + /// Owner in %@ + public static func roomMemberPowerLevelOwnerIn(_ p1: String) -> String { + return VectorL10n.tr("Vector", "room_member_power_level_owner_in", p1) + } /// You will not be able to undo this change as you are promoting the user to have the same power level as yourself.\nAre you sure? public static var roomMemberPowerLevelPrompt: String { return VectorL10n.tr("Vector", "room_member_power_level_prompt") @@ -6171,6 +6175,10 @@ public class VectorL10n: NSObject { public static var roomMemberPowerLevelShortModerator: String { return VectorL10n.tr("Vector", "room_member_power_level_short_moderator") } + /// Owner + public static var roomMemberPowerLevelShortOwner: String { + return VectorL10n.tr("Vector", "room_member_power_level_short_owner") + } /// Editing public static var roomMessageEditing: String { return VectorL10n.tr("Vector", "room_message_editing") diff --git a/Riot/Model/Room/RoomPowerLevel.swift b/Riot/Model/Room/RoomPowerLevel.swift index b008801b2..9463f5586 100644 --- a/Riot/Model/Room/RoomPowerLevel.swift +++ b/Riot/Model/Room/RoomPowerLevel.swift @@ -10,13 +10,16 @@ import Foundation /// Riot Standard Room Member Power Level @objc public enum RoomPowerLevel: Int { + case owner = 150 case admin = 100 case moderator = 50 case user = 0 public init?(rawValue: Int) { switch rawValue { - case 100...: + case 150...: + self = .owner + case 100...149: self = .admin case 50...99: self = .moderator diff --git a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m index 2e3e5b155..07b3f3dd3 100644 --- a/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m +++ b/Riot/Modules/Room/Members/Detail/RoomMemberDetailsViewController.m @@ -356,6 +356,10 @@ Please see LICENSE in the repository root for full details. RoomPowerLevel roomPowerLevel = [RoomPowerLevelHelper roomPowerLevelFrom:powerLevel]; switch (roomPowerLevel) { + case RoomPowerLevelOwner: + self.roomMemberPowerLevelLabel.text = [VectorL10n roomMemberPowerLevelOwnerIn:self.mxRoom.summary.displayName]; + self.roomMemberPowerLevelContainerView.hidden = NO; + break; case RoomPowerLevelAdmin: self.roomMemberPowerLevelLabel.text = [VectorL10n roomMemberPowerLevelAdminIn:self.mxRoom.summary.displayName]; self.roomMemberPowerLevelContainerView.hidden = NO; diff --git a/Riot/Modules/Room/Members/RoomParticipantsViewController.m b/Riot/Modules/Room/Members/RoomParticipantsViewController.m index bd7f07aed..6ec3b8e7c 100644 --- a/Riot/Modules/Room/Members/RoomParticipantsViewController.m +++ b/Riot/Modules/Room/Members/RoomParticipantsViewController.m @@ -988,6 +988,9 @@ Please see LICENSE in the repository root for full details. NSString *powerLevelText; switch (roomPowerLevel) { + case RoomPowerLevelOwner: + powerLevelText = [VectorL10n roomMemberPowerLevelShortOwner]; + break; case RoomPowerLevelAdmin: powerLevelText = [VectorL10n roomMemberPowerLevelShortAdmin]; break;