Add new FSM strategy CHAT_TOPIC strategy.py

This commit is contained in:
ZeroN 2023-10-20 18:21:47 +05:00 committed by GitHub
parent f08f4acfce
commit 791edeba11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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