chore: Correctly remove knockRestricted from possible join rules

This commit is contained in:
Christian Kußowski 2025-10-19 14:38:19 +02:00
commit 8bf46a3878
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -54,13 +54,12 @@ class ChatAccessSettingsController extends State<ChatAccessSettings> {
// Knock is only supported for rooms up from version 7: // Knock is only supported for rooms up from version 7:
if (roomVersionInt != null && roomVersionInt <= 6) { if (roomVersionInt != null && roomVersionInt <= 6) {
joinRules.remove(JoinRules.knock); joinRules.remove(JoinRules.knock);
joinRules.remove(JoinRules.knockRestricted);
} }
if (knownSpaceParents.isEmpty) { if (knownSpaceParents.isEmpty) {
joinRules.remove(JoinRules.restricted); joinRules.remove(JoinRules.restricted);
if (roomVersionInt != null && roomVersionInt <= 6) { joinRules.remove(JoinRules.knockRestricted);
joinRules.remove(JoinRules.knockRestricted);
}
} }
// If an unsupported join rule is the current join rule, display it: // If an unsupported join rule is the current join rule, display it: