- [Controller] Added a
do_nothing
method that preventscatch_all
from firing when a controller action doesn't send replies nor progresses the session. - [Replies] If
text
andspeech
replies are specified as an Array, Stealth will now randomize the selected text. - [Generators] Added sample payload handling to generated bots since it can be tricky.
- [Generators] Added
inflections.rb
to generators since we rely onActiveSupport::Inflector
to derive flow and controller names.
- [Sessions] Sessions retrieved when session expiration was enabled would return as an Array rather than a slug.
- [Replies] Replies will now always send the
sender_id
that came in to the service drivers. This ensurescurrent_session_id
hasn't been modified which would cause replies to fail to send.
- [General] Fixed controller and model concern load order. Previously files in the concerns folder were not loading before their respective controllers or models causing LoadErrors.
- [Server] Additional CONTENT_TYPE fixes that would cause the server to 500 when it was missing.
- [Server] Handle cases where CONTENT_TYPE is missing from incoming requests.
- [CI] Added Ruby 2.6 to build.
- [Server] Does not auto-return an HTTP 202. Leaves it up to the drivers again.
- [Sidekiq] Sidekiq queues have been renamed from
webhooks
anddefault
tostealth_webhooks
andstealth_replies
. Please ensure yourProcfile
is adjusted accordingly. - [Flows]
flow_map.current_state.fails_to
now returns aStealth::Session
instead of aStealth::Flow::State
. This might affect yourcatch_alls
.
- [Controllers]
current_session_id
now references the session ID in controllers - [Replies] Added support for dynamic delays
- [Replies] Added support for service-specific variants
- [Models] ActiveRecord is now part of the generated bot Gemfile and can be removed from bots
- [Flows] Added support for
redirects_to
during state declaration. If specified, will automatically step a user to the specified state or session. - [Flows]
redirects_to
andfails_to
now support a session string as an argument (my_flow->some_state
). This allows you to fail and redirect to other flows. A state name specified as a string or symbol is still allowed. - [Errors] Backtraces are now more readable in logs
- [Sessions] Sessions can now be configured to expire after a specified period of inactivity.
- [Generators] Fixed flow generation
- [Generators] Fixed sample Facebook services.yml example
- [Controllers]
current_user_id
has been soft deprecated in favor ofcurrent_session_id