From 286d1662a47ff8fdfb3c5860eb57ec6a3e39d6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Mon, 20 Oct 2025 14:40:58 +0200 Subject: [PATCH] chore: Hide restricted and knock restricted for unsupported room versions --- .../chat_access_settings_controller.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/pages/chat_access_settings/chat_access_settings_controller.dart b/lib/pages/chat_access_settings/chat_access_settings_controller.dart index b39b3daf1..581da363c 100644 --- a/lib/pages/chat_access_settings/chat_access_settings_controller.dart +++ b/lib/pages/chat_access_settings/chat_access_settings_controller.dart @@ -54,6 +54,15 @@ class ChatAccessSettingsController extends State { // Knock is only supported for rooms up from version 7: if (roomVersionInt != null && roomVersionInt <= 6) { joinRules.remove(JoinRules.knock); + } + + // Restricted is only supported for rooms up from version 8: + if (roomVersionInt != null && roomVersionInt <= 7) { + joinRules.remove(JoinRules.restricted); + } + + // Knock-Restricted is only supported for rooms up from version 10: + if (roomVersionInt != null && roomVersionInt <= 9) { joinRules.remove(JoinRules.knockRestricted); }