summary refs log tree commit diff
path: root/synapse/handlers/room_summary.py
diff options
context:
space:
mode:
authorTravis Ralston <travisr@matrix.org>2022-05-17 04:41:39 -0600
committerGitHub <noreply@github.com>2022-05-17 10:41:39 +0000
commit942c30b16b86cb05d2109b13bc2c1dc9ac2fea70 (patch)
tree97e56aa03d4cef7b05e8c5adc5f41f2af0d9ebfe /synapse/handlers/room_summary.py
parentRemove code which updates `application_services_state.last_txn` (#12680) (diff)
downloadsynapse-942c30b16b86cb05d2109b13bc2c1dc9ac2fea70.tar.xz
Add a new room version for MSC3787's knock+restricted join rule (#12623)
Diffstat (limited to '')
-rw-r--r--synapse/handlers/room_summary.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/handlers/room_summary.py b/synapse/handlers/room_summary.py
index ff24ec8063..af83de3193 100644
--- a/synapse/handlers/room_summary.py
+++ b/synapse/handlers/room_summary.py
@@ -562,8 +562,13 @@ class RoomSummaryHandler:
         if join_rules_event_id:
             join_rules_event = await self._store.get_event(join_rules_event_id)
             join_rule = join_rules_event.content.get("join_rule")
-            if join_rule == JoinRules.PUBLIC or (
-                room_version.msc2403_knocking and join_rule == JoinRules.KNOCK
+            if (
+                join_rule == JoinRules.PUBLIC
+                or (room_version.msc2403_knocking and join_rule == JoinRules.KNOCK)
+                or (
+                    room_version.msc3787_knock_restricted_join_rule
+                    and join_rule == JoinRules.KNOCK_RESTRICTED
+                )
             ):
                 return True