Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions hydrogram/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,15 @@ async def _process_update(
for group in self.groups.values():
for handler in group:
try:
if parsed_update is not None and handler_type is not None:
if isinstance(handler, handler_type) and await handler.check(
self.client, parsed_update
):
await self._execute_callback(handler, parsed_update)
break
elif isinstance(handler, RawUpdateHandler):
if isinstance(handler, RawUpdateHandler):
await self._execute_callback(handler, raw_update, users, chats)
continue
if (
parsed_update is not None
and isinstance(handler, handler_type)
and await handler.check(self.client, parsed_update)
):
await self._execute_callback(handler, parsed_update)
break
except (hydrogram.StopPropagation, hydrogram.ContinuePropagation) as e:
if isinstance(e, hydrogram.StopPropagation):
Expand Down