Skip to content

Commit

Permalink
Update main_callback_query to use StateFilter for all states.
Browse files Browse the repository at this point in the history
  • Loading branch information
nessshon authored Apr 23, 2024
1 parent ecfd265 commit cd21c50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/bot/handlers/private/callback_query.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from aiogram import Router, F
from aiogram.filters import StateFilter
from aiogram.types import CallbackQuery
from aiogram_newsletter.manager import ANManager
from aiogram_tonconnect import ATCManager
Expand All @@ -16,7 +17,7 @@
router.callback_query.filter(F.message.chat.type == "private")


@router.callback_query(F.data == "main")
@router.callback_query(StateFilter("*"), F.data == "main")
async def main_callback_query(call: CallbackQuery, manager: Manager) -> None:
await Window.main_menu(manager)
await call.answer()
Expand Down

0 comments on commit cd21c50

Please sign in to comment.