viberio
viberio copied to clipboard
FSM storage implement
I've added FSM storage support for vibeio. The logic was migrated from aiogram v2.19 branch.
Features implemented:
- Storage (
BaseStorage,MemoryStorage,DisabledStorage). - Add context set to
DispatcherandViberBotinViberWebhookView.bind(...)method. - Migrate
deprecated.pyfrom aiogram. - Add
FSMStorageWarningand.warn()method for disabled storage. - Add
.current_state()method with user argument to dispatcher. This is a temporary feature. In the future, it will be working with no user argument. - (temporary) Removed bucket implementation from storage.
- Add StateFilter to builtin. For now, it works only as a filter without
state=key kwarg. I need more time to properly implement the "filter" brach so I can go further in this direction. For user comfort, I pass state in the data argument, so it can be accessed throughdata['state']in the handler (works only in message request, for now). - Add an example of how to use it
If you want to do more research on this, I've left some comments on each commit