mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 17:24:50 -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
|
@ -241,7 +241,15 @@ class EventAuthHandler:
|
|||
|
||||
# If the join rule is not restricted, this doesn't apply.
|
||||
join_rules_event = await self._store.get_event(join_rules_event_id)
|
||||
return join_rules_event.content.get("join_rule") == JoinRules.RESTRICTED
|
||||
content_join_rule = join_rules_event.content.get("join_rule")
|
||||
if content_join_rule == JoinRules.RESTRICTED:
|
||||
return True
|
||||
|
||||
# also check for MSC3787 behaviour
|
||||
if room_version.msc3787_knock_restricted_join_rule:
|
||||
return content_join_rule == JoinRules.KNOCK_RESTRICTED
|
||||
|
||||
return False
|
||||
|
||||
async def get_rooms_that_allow_join(
|
||||
self, state_ids: StateMap[str]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue