From 791edeba11cc703d2bf49a03661553f628893c2e Mon Sep 17 00:00:00 2001 From: ZeroN <128647503+OnaZeroN@users.noreply.github.com> Date: Fri, 20 Oct 2023 18:21:47 +0500 Subject: [PATCH] Add new FSM strategy CHAT_TOPIC strategy.py --- aiogram/fsm/strategy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aiogram/fsm/strategy.py b/aiogram/fsm/strategy.py index 2695d60e..9c14eeb2 100644 --- a/aiogram/fsm/strategy.py +++ b/aiogram/fsm/strategy.py @@ -7,7 +7,7 @@ class FSMStrategy(Enum): CHAT = auto() GLOBAL_USER = auto() USER_IN_TOPIC = auto() - + CHAT_TOPIC = auto() def apply_strategy( strategy: FSMStrategy, @@ -21,4 +21,6 @@ def apply_strategy( return user_id, user_id, None 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, user_id, None