Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reply for button on message #407

Open
balrozhka opened this issue May 26, 2024 · 4 comments
Open

Reply for button on message #407

balrozhka opened this issue May 26, 2024 · 4 comments
Labels
core Something, that affects core functionality enhancement New feature or request

Comments

@balrozhka
Copy link

balrozhka commented May 26, 2024

Q1. Hi, can I start a dialogue by replaying the message with the button that I started.

Example:

  1. I have a handler that starts a dialog with the show_mode method=ShowMode.SEND
  2. I click on it. A dialog is launched that in reply contains the message on which the button was clicked.

Q2. And also when starting the remove_inline_kbd dialog on the message. How do I disable this action?

@Dmitrii-Gor
Copy link

hello, i have same question

@qud1tew
Copy link

qud1tew commented May 26, 2024

Same question.

@balrozhka
Copy link
Author

balrozhka commented May 27, 2024

@Tishka17 This is a case when pressing a button on a message outside the stack causes the keyboard on it to be deleted. We need your help in correcting the logic.

Example start:
await DialogManager.start(CreateTask.name, mode=StartMode.RESET_STACK, show_mode=ShowMode.SEND)

Logs:
2024-05-27 11:42:55,309 - aiogram_dialog.dialog - DEBUG - Dialog start: <State 'CreateTask:name'> (Dialog 'CreateTask')
2024-05-27 11:42:55,311 - aiogram_dialog.dialog - DEBUG - Dialog render (Dialog 'CreateTask')
2024-05-27 11:42:55,311 - aiogram_dialog.window - DEBUG - Show window: <Window(<State 'CreateTask:name'>)>
2024-05-27 11:42:55,313 - aiogram_dialog.manager.message_manager - DEBUG - Send new message, because: mode=ShowMode.SEND, has old_message=True
2024-05-27 11:42:55,313 - aiogram_dialog.manager.message_manager - DEBUG - remove_inline_kbd in ...
2024-05-27 11:42:55,416 - aiogram_dialog.manager.message_manager - DEBUG - send_text to ...

@Tishka17
Copy link
Owner

This was an intended behavior to handle outdated keyboards, but I guess in your case it's not always expected.

There is no direct way to disable deleting the keyboard, but you cat try starting dialog using BgManager: dialog_manager.bg().start(...)

@Tishka17 Tishka17 added enhancement New feature or request core Something, that affects core functionality labels Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Something, that affects core functionality enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants