diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 4bd027d9bb..46fe517957 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -532,7 +532,7 @@ class RoomMemberHandler(BaseHandler): class RoomListHandler(BaseHandler): @defer.inlineCallbacks - def get_public_room_list(self): + def get_published_rooms(self): chunk = yield self.store.get_rooms(is_public=True) results = yield defer.gatherResults( [ diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 0346afb1b4..5bc88e71eb 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -273,12 +273,13 @@ class JoinRoomAliasServlet(ClientV1RestServlet): # TODO: Needs unit testing class PublicRoomListRestServlet(ClientV1RestServlet): + # TODO(paul): Can't rename this now but 'v2 ought to call this publishedRooms 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() + data = yield handler.get_published_rooms() defer.returnValue((200, data))