From 2df4042656f70069b25f5e9a67832632a300a6be Mon Sep 17 00:00:00 2001 From: chiri Date: Wed, 18 Dec 2024 00:28:22 +0300 Subject: [PATCH 1/3] fix: replace deprecated `disable_web_page_preview` with `LinkPreview` --- src/aiogram_dialog/about.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aiogram_dialog/about.py b/src/aiogram_dialog/about.py index c4162512..ab9a7a20 100644 --- a/src/aiogram_dialog/about.py +++ b/src/aiogram_dialog/about.py @@ -4,6 +4,7 @@ from aiogram_dialog.dialog import Dialog from aiogram_dialog.widgets.kbd import Cancel, Keyboard, Start +from aiogram_dialog.widgets.link_preview import LinkPreview from aiogram_dialog.widgets.text import Const, Jinja, Text from aiogram_dialog.window import Window @@ -37,12 +38,12 @@ def about_dialog(): "{% endfor %}" "", ), + LinkPreview(is_disabled=True), Cancel(Const("Ok")), getter=metadata_getter, preview_data=metadata_getter, state=AiogramDialogStates.ABOUT, parse_mode="html", - disable_web_page_preview=True, ), ) From 2ce847647ca7c7c7e9366ff383a2bd142bb81b0f Mon Sep 17 00:00:00 2001 From: zax2002 Date: Fri, 27 Dec 2024 00:51:58 +0300 Subject: [PATCH 2/3] Typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a90e71b3..06e9529e 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ For more details see [documentation](https://aiogram-dialog.readthedocs.io) and * Stateful widgets: `Checkbox`, `Multiselect`, `Counter`, `TextInput`. They record user actions and allow you to retrieve this data later. * Multiple buttons layouts including simple grouping (`Group`, `Column`), page scrolling (`ScrollingGroup`), repeating of same buttons for list of data (`ListGroup`). * Sending media (like photo or video) with fileid caching and handling switching to/from message with no media. -* Different rules of transitions between windows/dialogs like keeping only one dialog on top of stack or force sending enw message instead of updating one. +* Different rules of transitions between windows/dialogs like keeping only one dialog on top of stack or force sending new message instead of updating one. * Offline HTML-preview for messages and transitions diagram. They can be used to check all states without emulating real use cases or exported for demonstration purposes. From c576414bf6ab58f07f01bb3bf579cc343a3458fb Mon Sep 17 00:00:00 2001 From: Andrey Tikhonov <17@itishka.org> Date: Sun, 12 Jan 2025 15:57:22 +0100 Subject: [PATCH 3/3] Fix handling callback query on message from inline mode --- src/aiogram_dialog/context/intent_middleware.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aiogram_dialog/context/intent_middleware.py b/src/aiogram_dialog/context/intent_middleware.py index 34de801d..3b4280ce 100644 --- a/src/aiogram_dialog/context/intent_middleware.py +++ b/src/aiogram_dialog/context/intent_middleware.py @@ -385,11 +385,11 @@ async def process_callback_query( event: CallbackQuery, data: dict, ): - event_context = event_context_from_callback(event) - data[EVENT_CONTEXT_KEY] = event_context - if "event_chat" not in data: return await handler(event, data) + + event_context = event_context_from_callback(event) + data[EVENT_CONTEXT_KEY] = event_context original_data = event.data if event.data: intent_id, callback_data = remove_intent_id(event.data)