Closed hacheybj closed 2 years ago
As discussed with @hacheybj, the issue comes from the fact that there are configurations on both the Botpress config and the bot config. The ones on the bot config have precedence over those on the Botpress config.
This means that if you set a sessionTimeoutInterval
in your Botpress config lower than the default timeoutInterval
(5min) of the bot config, the before_session_timout
hook or Timeout
flow are never triggered. All this because the session is deleted before it times out.
We should consider displaying a warning to the user when those values conflict. Something like:
[<BOT_ID>] Your timeout interval (source: <bot.config|botpress.config>) is greater than your session timeout (source: <bot.config|botpress.config>). This will prevent 'before_session_timeout' hooks and Timeout flows from being executed.
Available on v12.26.13
Available on
Describe the bug Hooks created in the
before_session_timeout
event hooks are not being invoked.To Reproduce Steps to reproduce the behaviour:
before_session_timeout
hookbp.logger.debug
orconsole.log
(whatever really just to get confirmation it was invoked or not)dialog_sessions
for confirmation the session was cleared (row deleted)Expected behaviour For the hook to run before the session is cleared from the DB
Screenshots N/A
Environment (please complete the following information):
Windows
Chrome
12.26.9
12.26.8
Additional context N/A