mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update webhook_flask_echo_bot.py
This commit is contained in:
parent
bc73f345b2
commit
1da5d1e0e2
@ -48,7 +48,7 @@ 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().decode('utf-8')
|
||||
json_string = flask.request.get_data().encode('utf-8')
|
||||
update = telebot.types.Update.de_json(json_string)
|
||||
bot.process_new_messages([update.message])
|
||||
return ''
|
||||
|
Loading…
Reference in New Issue
Block a user