@@ -56,7 +56,7 @@ class RoomVersion:
56
56
state_res = attr .ib (type = int ) # one of the StateResolutionVersions
57
57
enforce_key_validity = attr .ib (type = bool )
58
58
59
- # Before MSC2261/ MSC2432, m.room.aliases had special auth rules and redaction rules
59
+ # Before MSC2432, m.room.aliases had special auth rules and redaction rules
60
60
special_case_aliases_auth = attr .ib (type = bool )
61
61
# Strictly enforce canonicaljson, do not allow:
62
62
# * Integers outside the range of [-2 ^ 53 + 1, 2 ^ 53 - 1]
@@ -70,6 +70,9 @@ class RoomVersion:
70
70
msc2176_redaction_rules = attr .ib (type = bool )
71
71
# MSC3083: Support the 'restricted' join_rule.
72
72
msc3083_join_rules = attr .ib (type = bool )
73
+ # MSC2403: Allows join_rules to be set to 'knock', changes auth rules to allow sending
74
+ # m.room.membership event with membership 'knock'.
75
+ msc2403_knocking = attr .ib (type = bool )
73
76
74
77
75
78
class RoomVersions :
@@ -84,6 +87,7 @@ class RoomVersions:
84
87
limit_notifications_power_levels = False ,
85
88
msc2176_redaction_rules = False ,
86
89
msc3083_join_rules = False ,
90
+ msc2403_knocking = False ,
87
91
)
88
92
V2 = RoomVersion (
89
93
"2" ,
@@ -96,6 +100,7 @@ class RoomVersions:
96
100
limit_notifications_power_levels = False ,
97
101
msc2176_redaction_rules = False ,
98
102
msc3083_join_rules = False ,
103
+ msc2403_knocking = False ,
99
104
)
100
105
V3 = RoomVersion (
101
106
"3" ,
@@ -108,6 +113,7 @@ class RoomVersions:
108
113
limit_notifications_power_levels = False ,
109
114
msc2176_redaction_rules = False ,
110
115
msc3083_join_rules = False ,
116
+ msc2403_knocking = False ,
111
117
)
112
118
V4 = RoomVersion (
113
119
"4" ,
@@ -120,6 +126,7 @@ class RoomVersions:
120
126
limit_notifications_power_levels = False ,
121
127
msc2176_redaction_rules = False ,
122
128
msc3083_join_rules = False ,
129
+ msc2403_knocking = False ,
123
130
)
124
131
V5 = RoomVersion (
125
132
"5" ,
@@ -132,6 +139,7 @@ class RoomVersions:
132
139
limit_notifications_power_levels = False ,
133
140
msc2176_redaction_rules = False ,
134
141
msc3083_join_rules = False ,
142
+ msc2403_knocking = False ,
135
143
)
136
144
V6 = RoomVersion (
137
145
"6" ,
@@ -144,6 +152,7 @@ class RoomVersions:
144
152
limit_notifications_power_levels = True ,
145
153
msc2176_redaction_rules = False ,
146
154
msc3083_join_rules = False ,
155
+ msc2403_knocking = False ,
147
156
)
148
157
MSC2176 = RoomVersion (
149
158
"org.matrix.msc2176" ,
@@ -156,6 +165,7 @@ class RoomVersions:
156
165
limit_notifications_power_levels = True ,
157
166
msc2176_redaction_rules = True ,
158
167
msc3083_join_rules = False ,
168
+ msc2403_knocking = False ,
159
169
)
160
170
MSC3083 = RoomVersion (
161
171
"org.matrix.msc3083" ,
@@ -168,6 +178,20 @@ class RoomVersions:
168
178
limit_notifications_power_levels = True ,
169
179
msc2176_redaction_rules = False ,
170
180
msc3083_join_rules = True ,
181
+ msc2403_knocking = False ,
182
+ )
183
+ MSC2403 = RoomVersion (
184
+ "xyz.amorgan.knock" ,
185
+ RoomDisposition .UNSTABLE ,
186
+ EventFormatVersions .V3 ,
187
+ StateResolutionVersions .V2 ,
188
+ enforce_key_validity = True ,
189
+ special_case_aliases_auth = False ,
190
+ strict_canonicaljson = True ,
191
+ limit_notifications_power_levels = True ,
192
+ msc2176_redaction_rules = False ,
193
+ msc3083_join_rules = False ,
194
+ msc2403_knocking = True ,
171
195
)
172
196
173
197
@@ -183,4 +207,5 @@ class RoomVersions:
183
207
RoomVersions .MSC2176 ,
184
208
RoomVersions .MSC3083 ,
185
209
)
210
+ # Note that we do not include MSC2043 here unless it is enabled in the config.
186
211
} # type: Dict[str, RoomVersion]
0 commit comments