From 6c026c84aa22884132c6d27eb5438ab9d5e08c1b Mon Sep 17 00:00:00 2001 From: derAnfaenger Date: Tue, 15 Aug 2017 12:01:47 +0200 Subject: [PATCH] flaskserver: Load json python 3 compatible. --- zulip_botserver/zulip_botserver/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zulip_botserver/zulip_botserver/server.py b/zulip_botserver/zulip_botserver/server.py index 3a1494b..e50fd79 100644 --- a/zulip_botserver/zulip_botserver/server.py +++ b/zulip_botserver/zulip_botserver/server.py @@ -73,7 +73,7 @@ def handle_bot(bot): # TODO: Handle stateful bots properly. state_handler = StateHandler() - event = json.loads(request.data) + event = request.get_json(force=True) message_handler.handle_message(message=event["message"], bot_handler=restricted_client, state_handler=state_handler)