mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add new FSM strategy CHAT_TOPIC strategy.py
This commit is contained in:
parent
f08f4acfce
commit
791edeba11
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue