diff --git a/examples/webhook_examples/webhook_flask_echo_bot.py b/examples/webhook_examples/webhook_flask_echo_bot.py index 26b189e..92ffa21 100644 --- a/examples/webhook_examples/webhook_flask_echo_bot.py +++ b/examples/webhook_examples/webhook_flask_echo_bot.py @@ -48,9 +48,9 @@ def index(): @app.route(WEBHOOK_URL_PATH, methods=['POST']) def webhook(): if flask.request.headers.get('content-type') == 'application/json': - json_string = flask.request.get_data().encode('utf-8') + json_string = flask.request.get_data().decode('utf-8') update = telebot.types.Update.de_json(json_string) - bot.process_new_messages([update.message]) + bot.process_new_updates([update]) return '' else: flask.abort(403)