Skip to content

Releases: vitaliy-ukiru/fsm-telebot

Beta of fsm-telebot/v2 is here

04 Jun 19:04
f82e16d
Compare
Choose a tag to compare

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

23 Nov 17:07
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.3.2...v1.3.3

Patch safe join middlewares

11 Nov 16:37
Compare
Choose a tag to compare
  • Add safe join of global and local middlewares for excluding reuse capacity.
  • Internal renames and docs extend.
  • Bump dependecies.

v1.3.1

26 Oct 12:52
Compare
Choose a tag to compare
  • Fixed typo errors
  • Revert mistaken replace errors.Join
  • Small internal code styling

Go 1.20, middlewares and strategy storage

11 Oct 18:49
Compare
Choose a tag to compare

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:

  1. Arguments of the Manger.Bind and Manager.Handle methods.
  2. The manager's parent group
  3. The manager's Base group (telebot Group)
  4. By the bot group (telebot)

Full Changelog: v1.2.0...v1.3.0

Some styling errors, handling invalid values

10 Sep 14:52
Compare
Choose a tag to compare
  • add handling if value is invalid for memory and file storage in GetData
  • fixing typo errors in docs
  • styling docs

New storage, detailed errors

29 Aug 14:43
Compare
Choose a tag to compare

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

10 Jul 13:37
Compare
Choose a tag to compare

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

22 Apr 20:53
Compare
Choose a tag to compare

What's Changed

  • refactor(states): return err on getting or setting a state in #2
  • feat(stategroup): add Previous and Next methods in #1
  • feat(storage): let the GetData save data in to 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

28 Dec 10:44
9c43af2
Compare
Choose a tag to compare
1
v0.3.1

Update go.mod