summary refs log tree commit diff
path: root/synapse/api/room_versions.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/api/room_versions.py')
-rw-r--r--synapse/api/room_versions.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/synapse/api/room_versions.py b/synapse/api/room_versions.py

index 139fbf5524..4a4ad4c9bb 100644 --- a/synapse/api/room_versions.py +++ b/synapse/api/room_versions.py
@@ -57,7 +57,7 @@ class RoomVersion: state_res = attr.ib(type=int) # one of the StateResolutionVersions enforce_key_validity = attr.ib(type=bool) - # Before MSC2432, m.room.aliases had special auth rules and redaction rules + # Before MSC2261/MSC2432, m.room.aliases had special auth rules and redaction rules special_case_aliases_auth = attr.ib(type=bool) # Strictly enforce canonicaljson, do not allow: # * Integers outside the range of [-2 ^ 53 + 1, 2 ^ 53 - 1] @@ -69,8 +69,8 @@ class RoomVersion: limit_notifications_power_levels = attr.ib(type=bool) # MSC2174/MSC2176: Apply updated redaction rules algorithm. msc2176_redaction_rules = attr.ib(type=bool) - # MSC2174/MSC2176: Apply updated redaction rules algorithm. - msc2176_redaction_rules = attr.ib(type=bool) + # MSC3083: Support the 'restricted' join_rule. + msc3083_join_rules = attr.ib(type=bool) # MSC2403: Allows join_rules to be set to 'knock', changes auth rules to allow sending # m.room.membership event with membership 'knock'. allow_knocking = attr.ib(type=bool) @@ -88,6 +88,7 @@ class RoomVersions: limit_notifications_power_levels=False, msc2176_redaction_rules=False, allow_knocking=False, + msc3083_join_rules=False, ) V2 = RoomVersion( "2", @@ -100,6 +101,7 @@ class RoomVersions: limit_notifications_power_levels=False, msc2176_redaction_rules=False, allow_knocking=False, + msc3083_join_rules=False, ) V3 = RoomVersion( "3", @@ -112,6 +114,7 @@ class RoomVersions: limit_notifications_power_levels=False, msc2176_redaction_rules=False, allow_knocking=False, + msc3083_join_rules=False, ) V4 = RoomVersion( "4", @@ -124,6 +127,7 @@ class RoomVersions: limit_notifications_power_levels=False, msc2176_redaction_rules=False, allow_knocking=False, + msc3083_join_rules=False, ) V5 = RoomVersion( "5", @@ -136,6 +140,7 @@ class RoomVersions: limit_notifications_power_levels=False, msc2176_redaction_rules=False, allow_knocking=False, + msc3083_join_rules=False, ) V6 = RoomVersion( "6", @@ -148,6 +153,7 @@ class RoomVersions: limit_notifications_power_levels=True, msc2176_redaction_rules=False, allow_knocking=False, + msc3083_join_rules=False, ) V7 = RoomVersion( "7", @@ -160,6 +166,7 @@ class RoomVersions: limit_notifications_power_levels=True, msc2176_redaction_rules=False, allow_knocking=True, + msc3083_join_rules=False, ) MSC2176 = RoomVersion( "org.matrix.msc2176", @@ -171,6 +178,19 @@ class RoomVersions: strict_canonicaljson=True, limit_notifications_power_levels=True, msc2176_redaction_rules=True, + msc3083_join_rules=False, + ) + MSC3083 = RoomVersion( + "org.matrix.msc3083", + RoomDisposition.UNSTABLE, + EventFormatVersions.V3, + StateResolutionVersions.V2, + enforce_key_validity=True, + special_case_aliases_auth=False, + strict_canonicaljson=True, + limit_notifications_power_levels=True, + msc2176_redaction_rules=False, + msc3083_join_rules=True, allow_knocking=False, ) @@ -187,4 +207,5 @@ KNOWN_ROOM_VERSIONS = { RoomVersions.V7, RoomVersions.MSC2176, ) + # Note that we do not include MSC3083 here unless it is enabled in the config. } # type: Dict[str, RoomVersion]