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)