mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add current handler to filters, so that flags can be retrieved from it. (#1360)
* Add current handler to filters, so that flags can be retrieved from it. * run black isort * add changelog * Update CHANGES/1360.bugfix.rst Co-authored-by: Alex Root Junior <jroot.junior@gmail.com> --------- Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
This commit is contained in:
parent
228a86afdc
commit
9b5e462068
3 changed files with 4 additions and 2 deletions
|
|
@ -109,9 +109,10 @@ class TelegramEventObserver:
|
|||
Handler will be called when all its filters are pass.
|
||||
"""
|
||||
for handler in self.handlers:
|
||||
kwargs["handler"] = handler
|
||||
result, data = await handler.check(event, **kwargs)
|
||||
if result:
|
||||
kwargs.update(data, handler=handler)
|
||||
kwargs.update(data)
|
||||
try:
|
||||
wrapped_inner = self.outer_middleware.wrap_middlewares(
|
||||
self._resolve_middlewares(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue