This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 4 files changed +5
-3
lines changed 4 files changed +5
-3
lines changed Original file line number Diff line number Diff line change
1
+ Add support for the `/_matrix/client/v3` APIs from Matrix v1.1.
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ def _configure_named_resource(
193
193
{
194
194
"/_matrix/client/api/v1" : client_resource ,
195
195
"/_matrix/client/r0" : client_resource ,
196
+ "/_matrix/client/v3" : client_resource ,
196
197
"/_matrix/client/unstable" : client_resource ,
197
198
"/_matrix/client/v2_alpha" : client_resource ,
198
199
"/_matrix/client/versions" : client_resource ,
Original file line number Diff line number Diff line change 27
27
28
28
def client_patterns (
29
29
path_regex : str ,
30
- releases : Iterable [int ] = (0 , ),
30
+ releases : Iterable [str ] = ("r0" , "v3" ),
31
31
unstable : bool = True ,
32
32
v1 : bool = False ,
33
33
) -> Iterable [Pattern ]:
@@ -52,7 +52,7 @@ def client_patterns(
52
52
v1_prefix = CLIENT_API_PREFIX + "/api/v1"
53
53
patterns .append (re .compile ("^" + v1_prefix + path_regex ))
54
54
for release in releases :
55
- new_prefix = CLIENT_API_PREFIX + "/r%d" % ( release ,)
55
+ new_prefix = CLIENT_API_PREFIX + f"/ { release } "
56
56
patterns .append (re .compile ("^" + new_prefix + path_regex ))
57
57
58
58
return patterns
Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ class SigningKeyUploadServlet(RestServlet):
262
262
}
263
263
"""
264
264
265
- PATTERNS = client_patterns ("/keys/device_signing/upload$" , releases = ())
265
+ PATTERNS = client_patterns ("/keys/device_signing/upload$" , releases = ("v3" , ))
266
266
267
267
def __init__ (self , hs : "HomeServer" ):
268
268
super ().__init__ ()
You can’t perform that action at this time.
0 commit comments