1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Fix tests

This commit is contained in:
coder2020official 2022-03-06 19:52:42 +05:00
parent 441a5793cc
commit 3c7d3c0196

View File

@ -3675,8 +3675,9 @@ class TeleBot:
:param message:
:return:
"""
if self.middlewares: middlewares = [i for i in self.middlewares if update_type in i.update_types]
if not middlewares: return
middlewares = None
if self.middlewares:
middlewares = [i for i in self.middlewares if update_type in i.update_types]
return middlewares
def _run_middlewares_and_handler(self, message, handlers, middlewares, *args, **kwargs):