Skip to content

Commit

Permalink
Merge pull request #464 from ightingale/develop
Browse files Browse the repository at this point in the history
Fix missing error event context handling for aiogd_update
  • Loading branch information
Tishka17 authored Feb 17, 2025
2 parents d99d15f + feeffa5 commit 5933c4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aiogram_dialog/context/intent_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
EVENT_CONTEXT_KEY,
ChatEvent,
Context,
DialogUpdate,
DialogUpdateEvent,
EventContext,
Stack,
Expand Down Expand Up @@ -129,6 +130,8 @@ def event_context_from_error(event: ErrorEvent) -> EventContext:
return event_context_from_chat_join(event.update.chat_join_request)
elif event.update.callback_query:
return event_context_from_callback(event.update.callback_query)
elif isinstance(event.update, DialogUpdate) and event.update.aiogd_update:
return event_context_from_aiogd(event.update.aiogd_update)
raise ValueError("Unsupported event type in ErrorEvent.update")


Expand Down

0 comments on commit 5933c4f

Please sign in to comment.