Skip to content

Commit

Permalink
Heroku example update
Browse files Browse the repository at this point in the history
  • Loading branch information
Badiboy committed Mar 28, 2021
1 parent 87bce0b commit 96e0be8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/webhook_examples/webhook_flask_heroku_echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def echo_message(message):

@server.route('/' + TOKEN, methods=['POST'])
def getMessage():
bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))])
json_string = request.get_data().decode('utf-8')
update = telebot.types.Update.de_json(json_string)
bot.process_new_updates([update])
return "!", 200


Expand Down
2 changes: 1 addition & 1 deletion telebot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def infinity_polling(self, timeout=20, long_polling_timeout=20, logger_level=log
:param timeout: Request connection timeout
:param long_polling_timeout: Timeout in seconds for long polling (see API docs)
:param logger_level: Custom logging level for infinity_polling logging. None/NOTSET = no error logging
:param logger_level: Custom logging level for infinity_polling logging. Use logger levels from logging as a value. None/NOTSET = no error logging
"""
while not self.__stop_polling.is_set():
try:
Expand Down

0 comments on commit 96e0be8

Please sign in to comment.