mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
black + isort + Added ChangeLog
This commit is contained in:
parent
729a17903e
commit
b4a12a60bf
2 changed files with 6 additions and 4 deletions
2
CHANGES/<>.bugfix.rst
Normal file
2
CHANGES/<>.bugfix.rst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
- Scene action handlers (such as `enter`, `leave`, etc.) now properly receive context and data from observer (`outer_middleware`) middlewares, matching the behavior of regular handlers.
|
||||
- Fixed `TypeError` when accessing middleware-injected arguments inside scene handlers.
|
||||
|
|
@ -556,7 +556,9 @@ class SceneWizard:
|
|||
if not self.scene:
|
||||
raise SceneException("Scene is not initialized")
|
||||
|
||||
loggers.scene.debug("Call action %r in scene %r (middleware aware)", action.name, self.scene_config.state)
|
||||
loggers.scene.debug(
|
||||
"Call action %r in scene %r (middleware aware)", action.name, self.scene_config.state
|
||||
)
|
||||
action_config = self.scene_config.actions.get(action, {})
|
||||
if not action_config:
|
||||
loggers.scene.debug(
|
||||
|
|
@ -588,9 +590,7 @@ class SceneWizard:
|
|||
return await action_config[event_type].call(self.scene, event, **data)
|
||||
|
||||
await observer.wrap_outer_middleware(
|
||||
_actual_handler,
|
||||
event=self.event,
|
||||
data={**self.data, **kwargs}
|
||||
_actual_handler, event=self.event, data={**self.data, **kwargs}
|
||||
)
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue