Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 5325f03

Browse files
authored
r0.6.1 support: /rooms/:roomId/aliases endpoint (#9224)
[MSC2432](matrix-org/matrix-spec-proposals#2432) added this endpoint originally but it has since been included in the spec for nearly a year. This is progress towards #8334
1 parent d7a646a commit 5325f03

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

changelog.d/9224.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add new endpoint `/_matrix/client/r0/rooms/{roomId}/aliases` from Client-Server API r0.6.1 (previously [MSC2432](https://github.com/matrix-org/matrix-doc/pull/2432)).

synapse/rest/client/v1/room.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ class RoomAliasListServlet(RestServlet):
910910
r"^/_matrix/client/unstable/org\.matrix\.msc2432"
911911
r"/rooms/(?P<room_id>[^/]*)/aliases"
912912
),
913-
]
913+
] + list(client_patterns("/rooms/(?P<room_id>[^/]*)/aliases$", unstable=False))
914914

915915
def __init__(self, hs: "HomeServer"):
916916
super().__init__()

tests/rest/client/v1/test_rooms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,8 +1880,7 @@ def _get_aliases(self, access_token: str, expected_code: int = 200) -> JsonDict:
18801880
"""Calls the endpoint under test. returns the json response object."""
18811881
channel = self.make_request(
18821882
"GET",
1883-
"/_matrix/client/unstable/org.matrix.msc2432/rooms/%s/aliases"
1884-
% (self.room_id,),
1883+
"/_matrix/client/r0/rooms/%s/aliases" % (self.room_id,),
18851884
access_token=access_token,
18861885
)
18871886
self.assertEqual(channel.code, expected_code, channel.result)

0 commit comments

Comments
 (0)