mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add ENABLE_MIDDLEWARE=False in apihelpers to keep backward compatibility
This commit is contained in:
@ -309,7 +309,8 @@ class TeleBot:
|
||||
|
||||
for update in updates:
|
||||
|
||||
self.process_middlewares(update)
|
||||
if apihelper.ENABLE_MIDDLEWARE:
|
||||
self.process_middlewares(update)
|
||||
|
||||
if update.update_id > self.last_update_id:
|
||||
self.last_update_id = update.update_id
|
||||
|
@ -26,6 +26,8 @@ FILE_URL = None
|
||||
CONNECT_TIMEOUT = 3.5
|
||||
READ_TIMEOUT = 9999
|
||||
|
||||
ENABLE_MIDDLEWARE = False
|
||||
|
||||
|
||||
def _get_req_session(reset=False):
|
||||
return util.per_thread('req_session', lambda: requests.session(), reset)
|
||||
|
Reference in New Issue
Block a user