mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 05:24:55 -04:00
Add a new room version for MSC3787's knock+restricted join rule (#12623)
This commit is contained in:
parent
24b590de32
commit
942c30b16b
6 changed files with 68 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue