Always show security and privacy, and just hide the knocking jojn rule option through the feature flag

This commit is contained in:
Mauro Romito
2025-11-10 18:56:20 +01:00
committed by Mauro
parent dd95a4313a
commit beb7900017
9 changed files with 173 additions and 35 deletions
@@ -40,8 +40,13 @@ protocol RoomPowerLevelsProxyProtocol {
// MARK: - Helpers
extension RoomPowerLevelsProxyProtocol {
/// Can own user edit either the room name, avatar or topic
/// Can own user edit either the room name, avatar or topic.
func canOwnUserEditBaseInfo() -> Bool {
canOwnUser(sendStateEvent: .roomAvatar) || canOwnUser(sendStateEvent: .roomName) || canOwnUser(sendStateEvent: .roomTopic)
}
/// Can own user edit any of the security and privacy settings.
func canOwnUserEditSecurityAndPrivacy() -> Bool {
canOwnUser(sendStateEvent: .roomEncryption) || canOwnUser(sendStateEvent: .roomAliases) || canOwnUser(sendStateEvent: .roomJoinRules) || canOwnUser(sendStateEvent: .roomHistoryVisibility)
}
}