Releases: vitaliy-ukiru/fsm-telebot
Beta of fsm-telebot/v2 is here
What's Changed
- Reworked storage.
- Added key strategy.
- Add context.Context flow
- Change backend for store and execute handlers
- Optimize states group
- Add new opportunities for filter state.
Full Changelog: v1.3.3...v2.0.0-beta.1
Support for telebot v3.2.1
Patch safe join middlewares
- Add safe join of global and local middlewares for excluding reuse capacity.
- Internal renames and docs extend.
- Bump dependecies.
v1.3.1
- Fixed typo errors
- Revert mistaken replace
errors.Join
- Small internal code styling
Go 1.20, middlewares and strategy storage
Go version was bumped to 1.20!
What's Changed
- Added correct support for middlewares. You can setup middlewares via Manager
- Unmark Manager.NewGroup as deprecated. Now the logic is as it was intended.
- Added storage with support strategy of address.
- Using new abilities of Go (type parameters specifically)
- Also was internal changes, what makes code better.
Middlewares
Previously, attempts to use middlewares could give unexpected results. With this update, the behavior is correct.
Now each manager has his own middleware group. You can create managers with a subgroup using Manager.NewGroup
These groups will be combined with middlewares from:
- Arguments of the
Manger.Bind
andManager.Handle
methods. - The manager's parent group
- The manager's Base group (telebot Group)
- By the bot group (telebot)
Full Changelog: v1.2.0...v1.3.0
Some styling errors, handling invalid values
- add handling if value is invalid for memory and file storage in GetData
- fixing typo errors in docs
- styling docs
New storage, detailed errors
Announcement | BUMP GO VERSION
Starting with v1.3.0
, the module go version will bumped.
Version v1.2.x
with go1.17 will be supported in support/v1.2.x
branch for vulnerabilities/bugs.
Announcement 2
redist storage moved to separated repository and now avaliable for go modules as github.com/nacknime-official/fsm-telebot-redis-storage
What's Changed
- Getting rid of archived/deprecated pkg/errors by @rusq in #5
- feat: move redis storage to submodule by @nacknime-official in #6
- refactor errors
- feat: add file storages
Full Changelog: v1.1.1...v1.2.0
file storage
This storage is stored in files and can restore its state from files.
For universality, saving data in the format is moved to the Provider interface. This allows you not to think at the storage level about how the data will be stored. The file/provider sub-package implements some formats. More details in storages/README
Custom context inlining, internal changes
Handler records are stored as a chain. Therefore, now a linked list (container/list) is used to store them, the insertion speed is more important than getting by index (it is not used), and for iterating through the list, there is not much difference in speed (in theory)
Also, state groups are now stored as a hash set. This speeds up the check on match
Added the ability to use a custom implementation of Context
. To do this, pass the context creation function (type ContextMakerFunc
) as the ctxMaker
argument to NewManager
or call the Manager.SetContextMaker
method. By default, NewFSMContext
is used
Methods:
- Remove:
- Manager.GetState
- Manger.SetState
- Renamed
- State.String => GoString
- Manager.ForState => TelebotHandlerForState
- Manager.ForStates => TelebotHandlerForStates
Full Changelog: v0.4.1...v1.1
Storage API changes, custom Context implementation in handlers
What's Changed
- refactor(states): return err on getting or setting a state in #2
- feat(stategroup): add
Previous
andNext
methods in #1 - feat(storage): let the
GetData
save data into
argument in #4 - feat(storage): add redis storage by @nacknime-official in #3
*feat: add possibility using own fsm.Context in handlers
Full Changelog: v0.3...v0.4.1
1
v0.3.1 Update go.mod