botpress / studio

The studio is the main interface you'll use to build and edit your chatbot.
https://botpress.com/docs/quickstart#conversation-studio
35 stars 37 forks source link

fix(hooks): send events to core on bot mount and unmount #322

Closed laurentlp closed 2 years ago

laurentlp commented 2 years ago

This PR fixes an issue where unmounting or mounting a bot using the bot config page would not trigger after_bot_mount and after_bot_unmount hooks. The reason was that the core was never aware of this change. To fix the issue, we simply send an internal call to the core telling it to unmount/mount a certain bot.

Closes https://github.com/botpress/v12/issues/1618

Related to:

linear[bot] commented 2 years ago
DEV-2420 [BUG] on bot mount hook are only executed on server restart (botpress/botpress botpress/v12#1618)

**Describe the bug**\ on bot mount hook are not executed if we remount a hook and only on server restart **To Reproduce**\ Create an on bot mount hook\ unmount and remount your bot\ You will see that the hook won't be executed Restart the server and the hook will be executed [botpress/borpress botpress/v12#1618](https://github.com/botpress/v12/issues/1618) by [@ sebburon](https://github.com/sebburon)