summary refs log tree commit diff
path: root/synapse/rest/client/v1/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-14 15:22:21 +0100
committerErik Johnston <erik@matrix.org>2016-06-14 15:22:21 +0100
commit3b52bd1cf6a1adccd135fdec0904a1bdc25e308a (patch)
treecb5c93be89960d00288f7102ce645018a67bd623 /synapse/rest/client/v1/room.py
parentIndicate if /sync was limited or not (diff)
parentMerge pull request #868 from matrix-org/erikj/invalid_id (diff)
downloadsynapse-3b52bd1cf6a1adccd135fdec0904a1bdc25e308a.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/paginate_sync
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r--synapse/rest/client/v1/room.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py

index 644aa4e513..86fbe2747d 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py
@@ -72,8 +72,6 @@ class RoomCreateRestServlet(ClientV1RestServlet): def get_room_config(self, request): user_supplied_config = parse_json_object_from_request(request) - # default visibility - user_supplied_config.setdefault("visibility", "public") return user_supplied_config def on_OPTIONS(self, request): @@ -279,8 +277,16 @@ class PublicRoomListRestServlet(ClientV1RestServlet): @defer.inlineCallbacks def on_GET(self, request): - handler = self.handlers.room_list_handler - data = yield handler.get_public_room_list() + try: + yield self.auth.get_user_by_req(request) + except AuthError: + # This endpoint isn't authed, but its useful to know who's hitting + # it if they *do* supply an access token + pass + + handler = self.hs.get_room_list_handler() + data = yield handler.get_aggregated_public_room_list() + defer.returnValue((200, data))