Skip to content

Commit

Permalink
debug hide
Browse files Browse the repository at this point in the history
  • Loading branch information
salko-ua committed Jan 10, 2024
1 parent e8a2320 commit d61a007
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ async def __call__(
data: Dict[str, Any],
) -> Any:
try:
print(event.chat.id)
print(event.message_thread_id)
# print(event.chat.id)
# print(event.message_thread_id)
return await handler(event, data)
except aiohttp.ClientConnectionError as e:
print(f"Error: {e}")
Expand All @@ -27,13 +27,11 @@ async def __call__(
event: Message | CallbackQuery,
data: Dict[str, Any],
) -> Any:
if (
isinstance(event, CallbackQuery)
and event.message
and event.message.chat.type == "private"
):
return await handler(event, data)
elif isinstance(event, Message) and event.chat.type == "private":
return await handler(event, data)
if isinstance(event, CallbackQuery):
if event.message.chat.type == "private":
return await handler(event, data)
elif isinstance(event, Message):
if event.chat.type == "private":
return await handler(event, data)
else:
pass

0 comments on commit d61a007

Please sign in to comment.