From 4caa19cfecabd4a51f4598af8dc20571562e3baa Mon Sep 17 00:00:00 2001 From: ZeroN <128647503+OnaZeroN@users.noreply.github.com> Date: Sun, 22 Oct 2023 01:35:13 +0500 Subject: [PATCH] Update strategy.py --- aiogram/fsm/strategy.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aiogram/fsm/strategy.py b/aiogram/fsm/strategy.py index 5a2c8d4a..59531f1e 100644 --- a/aiogram/fsm/strategy.py +++ b/aiogram/fsm/strategy.py @@ -12,9 +12,9 @@ class FSMStrategy(Enum): def apply_strategy( strategy: FSMStrategy, chat_id: int, - user_id: Optional[int] = None, + user_id: int, thread_id: Optional[int] = None, -) -> Tuple[int, Optional[int], Optional[int]]: +) -> Tuple[int, int, Optional[int]]: if strategy == FSMStrategy.CHAT: return chat_id, chat_id, None if strategy == FSMStrategy.GLOBAL_USER: @@ -22,5 +22,6 @@ def apply_strategy( if strategy == FSMStrategy.USER_IN_TOPIC: return chat_id, user_id, thread_id if strategy == FSMStrategy.CHAT_TOPIC: - return chat_id, None, thread_id + return chat_id, chat_id, thread_id + return chat_id, user_id, None