mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Changed "Process_new_message" to "Process_new_update"
This way all types of queries (Message, Inline query, Callback query) are supported.
This commit is contained in:
parent
fbaf88c237
commit
aee9255568
@ -46,7 +46,7 @@ class WebhookServer(object):
|
|||||||
length = int(cherrypy.request.headers['content-length'])
|
length = int(cherrypy.request.headers['content-length'])
|
||||||
json_string = cherrypy.request.body.read(length).decode("utf-8")
|
json_string = cherrypy.request.body.read(length).decode("utf-8")
|
||||||
update = telebot.types.Update.de_json(json_string)
|
update = telebot.types.Update.de_json(json_string)
|
||||||
bot.process_new_messages([update.message])
|
bot.process_new_updates([update])
|
||||||
return ''
|
return ''
|
||||||
else:
|
else:
|
||||||
raise cherrypy.HTTPError(403)
|
raise cherrypy.HTTPError(403)
|
||||||
|
Loading…
Reference in New Issue
Block a user