v12 icon indicating copy to clipboard operation
v12 copied to clipboard

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

Open laurentlp opened this issue 4 years ago • 1 comments

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):

  • OS: Arch Linux
  • Browser Chrome
  • Browser Version Latest
  • Botpress Version 12.26.8
  • NodeJS 12.18.1

laurentlp avatar Dec 08 '21 23:12 laurentlp

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

charlescatta avatar Dec 09 '21 19:12 charlescatta