Merge pull request #163 from agentik-007/patch-1

Update webhook_flask_echo_bot.py
This commit is contained in:
FrankWang 2016-05-17 08:41:34 +08:00
commit b8770e2c04
1 changed files with 1 additions and 1 deletions

View File

@ -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 ''