mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
more explict process_middleware exceptions suppressing
This commit is contained in:
parent
042d8c17da
commit
855b838e91
@ -350,12 +350,12 @@ class TeleBot:
|
||||
logger.error(str(e))
|
||||
if not self.suppress_middleware_excepions:
|
||||
raise
|
||||
update.middleware_error = e # for future handling if it needed
|
||||
else:
|
||||
if update.update_id > self.last_update_id: self.last_update_id = update.update_id
|
||||
continue
|
||||
|
||||
if update.update_id > self.last_update_id:
|
||||
self.last_update_id = update.update_id
|
||||
if hasattr(update, 'middleware_error'):
|
||||
continue
|
||||
if update.message:
|
||||
if new_messages is None: new_messages = []
|
||||
new_messages.append(update.message)
|
||||
|
Loading…
Reference in New Issue
Block a user