diff --git a/CHANGES/1724.bugfix.rst b/CHANGES/1724.bugfix.rst new file mode 100644 index 00000000..7f589d3f --- /dev/null +++ b/CHANGES/1724.bugfix.rst @@ -0,0 +1 @@ +Added dispatcher key to event data in `Dispatcher.feed_update`, removed redundant unpacking of `workflow_data` in `Dispatcher.start_polling`. diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 5aff6a01..6bcfae51 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -168,6 +168,7 @@ class Dispatcher(Router): **self.workflow_data, **kwargs, "bot": bot, + "dispatcher": self, }, ) handled = response is not UNHANDLED @@ -584,9 +585,7 @@ class Dispatcher(Router): ) workflow_data = { - "dispatcher": self, "bots": bots, - **self.workflow_data, **kwargs, } if "bot" in workflow_data: