mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Forum topic in FSM (#1161)
* Base implementation * Added tests, fixed arguments priority * Use `Optional[X]` instead of `X | None` * Added changelog * Added tests
This commit is contained in:
parent
1538bc2e2d
commit
942ba0d520
10 changed files with 164 additions and 60 deletions
17
CHANGES/1161.feature.rst
Normal file
17
CHANGES/1161.feature.rst
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Added support for FSM in Forum topics.
|
||||
|
||||
The strategy can be changed in dispatcher:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from aiogram.fsm.strategy import FSMStrategy
|
||||
...
|
||||
dispatcher = Dispatcher(
|
||||
fsm_strategy=FSMStrategy.USER_IN_THREAD,
|
||||
storage=..., # Any persistent storage
|
||||
)
|
||||
|
||||
.. note::
|
||||
|
||||
If you have implemented you own storages you should extend record key generation
|
||||
with new one attribute - `thread_id`
|
||||
Loading…
Add table
Add a link
Reference in a new issue