mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 01:54:53 +00:00
Add handler into context.
This commit is contained in:
parent
154c12a165
commit
f529f588da
1 changed files with 2 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
from aiogram.utils import context
|
||||
from .filters import check_filters
|
||||
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ class Handler:
|
|||
if await check_filters(filters, args):
|
||||
try:
|
||||
if self.middleware_key:
|
||||
context.set_value('$handler', handler)
|
||||
await self.dispatcher.middleware.trigger(f"process_{self.middleware_key}", args)
|
||||
response = await handler(*args)
|
||||
if results is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue