diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-09-12 20:41:31 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 20:41:31 +1000 |
commit | 02aa41809bd48cc1dd02da3634f02f5eae71b41c (patch) | |
tree | 71cd7d6ae4983d2cff2f2f25fa82b088d746871b /synapse/rest/client/v1/events.py | |
parent | Port crypto/ to Python 3 (#3822) (diff) | |
download | synapse-02aa41809bd48cc1dd02da3634f02f5eae71b41c.tar.xz |
Port rest/ to Python 3 (#3823)
Diffstat (limited to 'synapse/rest/client/v1/events.py')
-rw-r--r-- | synapse/rest/client/v1/events.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/rest/client/v1/events.py b/synapse/rest/client/v1/events.py index 0f3a2e8b51..cd9b3bdbd1 100644 --- a/synapse/rest/client/v1/events.py +++ b/synapse/rest/client/v1/events.py @@ -45,20 +45,20 @@ class EventStreamRestServlet(ClientV1RestServlet): is_guest = requester.is_guest room_id = None if is_guest: - if "room_id" not in request.args: + if b"room_id" not in request.args: raise SynapseError(400, "Guest users must specify room_id param") - if "room_id" in request.args: - room_id = request.args["room_id"][0] + if b"room_id" in request.args: + room_id = request.args[b"room_id"][0].decode('ascii') pagin_config = PaginationConfig.from_request(request) timeout = EventStreamRestServlet.DEFAULT_LONGPOLL_TIME_MS - if "timeout" in request.args: + if b"timeout" in request.args: try: - timeout = int(request.args["timeout"][0]) + timeout = int(request.args[b"timeout"][0]) except ValueError: raise SynapseError(400, "timeout must be in milliseconds.") - as_client_event = "raw" not in request.args + as_client_event = b"raw" not in request.args chunk = yield self.event_stream_handler.get_stream( requester.user.to_string(), |