An ExGram.Router.Filter that matches on the current FSM state or FSM data.
This filter is automatically registered as the :fsm_state alias when
use ExGram.FSM detects that use ExGram.Router has also been called on
the same module.
Usage
Match on FSM state atom:
scope do
filter :fsm_state, :get_name
filter :text
handle &MyBot.Handlers.got_name/1
endMatch on a key in FSM data:
scope do
filter :fsm_state, {:step, :confirm}
handle &MyBot.Handlers.confirm/1
endOptions
atom— matches whencontext.extra.fsm.state == atom{key, value}— matches whencontext.extra.fsm.data[key] == valuenil— matches when there is no FSM state set (state == nil)
Summary
Functions
Filter callback.