botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
68 stars 83 forks source link

[BUG] - wrong key name for channel-web sent history #1567

Open laurentlp opened 2 years ago

laurentlp commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

It seems like window.BOT_ID is undefined, which is causing the issue (see: modules/channel-web/src/views/lite/store/composer.ts).

To Reproduce Steps to reproduce the behavior:

  1. Open the studio
  2. Converse with your bot
  3. Open your browser's DevTools
  4. Under Application -> localStorage, you'll see a bp::undefined::sentHistory key

Expected behavior The key should be something like ``

Screenshots Screenshot from 2021-12-08 18-17-37 Screenshot from 2021-12-08 18-18-02

Environment (please complete the following information):

charlescatta commented 2 years ago

https://github.com/botpress/botpress/blob/HEAD/modules/channel-web/src/views/lite/store/composer.ts#L10-L11 window.BOT_ID might not be assigned yet when the code is run, I can't find where it is being set