mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 01:54:53 +00:00
Fix callback query handler for callbacks without 'message' property.
This commit is contained in:
parent
a1aefb9ea6
commit
59cecdbd6a
1 changed files with 3 additions and 2 deletions
|
|
@ -165,8 +165,9 @@ class Dispatcher:
|
|||
state=state)
|
||||
return await self.chosen_inline_result_handlers.notify(update.chosen_inline_result)
|
||||
if update.callback_query:
|
||||
state = await self.storage.get_state(chat=update.callback_query.message.chat.id,
|
||||
user=update.callback_query.from_user.id)
|
||||
state = await self.storage.get_state(
|
||||
chat=update.callback_query.message.chat.id if update.callback_query.message else None,
|
||||
user=update.callback_query.from_user.id)
|
||||
context.update_state(user=update.callback_query.from_user.id,
|
||||
state=state)
|
||||
return await self.callback_query_handlers.notify(update.callback_query)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue