diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-27 15:34:01 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-27 15:34:01 +0100 |
commit | 08881d808d7cfd600d130eb7a960c6c51c797a09 (patch) | |
tree | 1a8c8833a981b9a01e5f8c68c555203f2bc59455 /synapse/rest/room.py | |
parent | Index sources in a nicer fashion. (diff) | |
parent | BF: use room_id if there is no alias (diff) | |
download | synapse-08881d808d7cfd600d130eb7a960c6c51c797a09.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
Diffstat (limited to 'synapse/rest/room.py')
-rw-r--r-- | synapse/rest/room.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py index f4c12191c8..66efaa76f0 100644 --- a/synapse/rest/room.py +++ b/synapse/rest/room.py @@ -265,6 +265,17 @@ class JoinRoomAliasServlet(RestServlet): # TODO: Needs unit testing +class PublicRoomListRestServlet(RestServlet): + PATTERN = client_path_pattern("/publicRooms$") + + @defer.inlineCallbacks + def on_GET(self, request): + handler = self.handlers.room_list_handler + data = yield handler.get_public_room_list() + defer.returnValue((200, data)) + + +# TODO: Needs unit testing class RoomMemberListRestServlet(RestServlet): PATTERN = client_path_pattern("/rooms/(?P<room_id>[^/]*)/members$") @@ -424,3 +435,4 @@ def register_servlets(hs, http_server): RoomTriggerBackfill(hs).register(http_server) RoomMembershipRestServlet(hs).register(http_server) RoomSendEventRestServlet(hs).register(http_server) + PublicRoomListRestServlet(hs).register(http_server) |