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

Commit

Permalink
r0.6.1 support: /rooms/:roomId/aliases endpoint (#9224)
Browse files Browse the repository at this point in the history
[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
  • Loading branch information
turt2live authored Jun 3, 2021
1 parent d7a646a commit 5325f03
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/9224.feature
Original file line number Diff line number Diff line change
@@ -0,0 +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)).
2 changes: 1 addition & 1 deletion synapse/rest/client/v1/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ class RoomAliasListServlet(RestServlet):
r"^/_matrix/client/unstable/org\.matrix\.msc2432"
r"/rooms/(?P<room_id>[^/]*)/aliases"
),
]
] + list(client_patterns("/rooms/(?P<room_id>[^/]*)/aliases$", unstable=False))

def __init__(self, hs: "HomeServer"):
super().__init__()
Expand Down
3 changes: 1 addition & 2 deletions tests/rest/client/v1/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1880,8 +1880,7 @@ def _get_aliases(self, access_token: str, expected_code: int = 200) -> JsonDict:
"""Calls the endpoint under test. returns the json response object."""
channel = self.make_request(
"GET",
"/_matrix/client/unstable/org.matrix.msc2432/rooms/%s/aliases"
% (self.room_id,),
"/_matrix/client/r0/rooms/%s/aliases" % (self.room_id,),
access_token=access_token,
)
self.assertEqual(channel.code, expected_code, channel.result)
Expand Down

0 comments on commit 5325f03

Please sign in to comment.