mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 23:44:12 -04:00
Add support for /_matrix/client/v3
APIs (#11318)
This is one of the changes required to support Matrix 1.1 Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
7468723697
commit
dfa536490e
4 changed files with 5 additions and 3 deletions
|
@ -27,7 +27,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
def client_patterns(
|
||||
path_regex: str,
|
||||
releases: Iterable[int] = (0,),
|
||||
releases: Iterable[str] = ("r0", "v3"),
|
||||
unstable: bool = True,
|
||||
v1: bool = False,
|
||||
) -> Iterable[Pattern]:
|
||||
|
@ -52,7 +52,7 @@ def client_patterns(
|
|||
v1_prefix = CLIENT_API_PREFIX + "/api/v1"
|
||||
patterns.append(re.compile("^" + v1_prefix + path_regex))
|
||||
for release in releases:
|
||||
new_prefix = CLIENT_API_PREFIX + "/r%d" % (release,)
|
||||
new_prefix = CLIENT_API_PREFIX + f"/{release}"
|
||||
patterns.append(re.compile("^" + new_prefix + path_regex))
|
||||
|
||||
return patterns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue