0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-02 20:59:12 +01:00

Use parse_string

This commit is contained in:
Erik Johnston 2016-09-08 15:51:10 +01:00
parent 791658b576
commit 3f9889bfd6

View file

@ -23,7 +23,7 @@ from synapse.api.constants import EventTypes, Membership
from synapse.api.filtering import Filter from synapse.api.filtering import Filter
from synapse.types import UserID, RoomID, RoomAlias from synapse.types import UserID, RoomID, RoomAlias
from synapse.events.utils import serialize_event 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 logging
import urllib import urllib
@ -295,7 +295,7 @@ class PublicRoomListRestServlet(ClientV1RestServlet):
@defer.inlineCallbacks @defer.inlineCallbacks
def on_GET(self, request): def on_GET(self, request):
server = request.args.get("server", [None])[0] server = parse_string(request, "server", default=None)
try: try:
yield self.auth.get_user_by_req(request) yield self.auth.get_user_by_req(request)