diff options
author | Erik Johnston <erik@matrix.org> | 2016-09-08 15:51:10 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-09-08 15:51:10 +0100 |
commit | 3f9889bfd69ae511f2cfedb5d3749f89878b5498 (patch) | |
tree | be695675d3de6b366a515f932f520c7c89b5aef1 /synapse/rest/client/v1/room.py | |
parent | Add server param to /publicRooms (diff) | |
download | synapse-3f9889bfd69ae511f2cfedb5d3749f89878b5498.tar.xz |
Use parse_string
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r-- | synapse/rest/client/v1/room.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 7971e53010..3c933f1620 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -23,7 +23,7 @@ from synapse.api.constants import EventTypes, Membership from synapse.api.filtering import Filter from synapse.types import UserID, RoomID, RoomAlias from synapse.events.utils import serialize_event -from synapse.http.servlet import parse_json_object_from_request +from synapse.http.servlet import parse_json_object_from_request, parse_string import logging import urllib @@ -295,7 +295,7 @@ class PublicRoomListRestServlet(ClientV1RestServlet): @defer.inlineCallbacks def on_GET(self, request): - server = request.args.get("server", [None])[0] + server = parse_string(request, "server", default=None) try: yield self.auth.get_user_by_req(request) |