summary refs log tree commit diff
path: root/synapse/rest/client/v1
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-09-08 15:51:10 +0100
committerErik Johnston <erik@matrix.org>2016-09-08 15:51:10 +0100
commit3f9889bfd69ae511f2cfedb5d3749f89878b5498 (patch)
treebe695675d3de6b366a515f932f520c7c89b5aef1 /synapse/rest/client/v1
parentAdd server param to /publicRooms (diff)
downloadsynapse-3f9889bfd69ae511f2cfedb5d3749f89878b5498.tar.xz
Use parse_string
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r--synapse/rest/client/v1/room.py4
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)