- [Controller] Added a
do_nothingmethod that preventscatch_allfrom firing when a controller action doesn't send replies nor progresses the session. - [Replies] If
textandspeechreplies 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.rbto generators since we rely onActiveSupport::Inflectorto 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_idthat came in to the service drivers. This ensurescurrent_session_idhasn'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
webhooksanddefaulttostealth_webhooksandstealth_replies. Please ensure yourProcfileis adjusted accordingly. - [Flows]
flow_map.current_state.fails_tonow returns aStealth::Sessioninstead of aStealth::Flow::State. This might affect yourcatch_alls.
- [Controllers]
current_session_idnow 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_toduring state declaration. If specified, will automatically step a user to the specified state or session. - [Flows]
redirects_toandfails_tonow 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_idhas been soft deprecated in favor ofcurrent_session_id