Closed charlescatta closed 2 years ago
@charlescatta The Pull Request I opened will now display a warning in the console if the user tries to send proactive messages on webchatLoaded
. To make your example work, the proactive message should be sent on webchatReady
.
Also, the session_reset
event is never called. You would need to check the value from event.data.payload.type
instead of event.data.message_type
.
Here is a working version of embed-clear-on-reset-html.txt
Please let me know if the documentation says the contrary or if you have seen examples that contradict what I just detailed so I can adjust them.
Describe the bug When trying to call a proactive trigger on slow connections on "webchatLoaded" the trigger sometimes does not get sent and errors occur, this also happens when trying to reset the conversation on "session_reset"
Related botpress/v12#1317
Error:![image](https://user-images.githubusercontent.com/18604963/129926387-76840f0f-b574-44d1-86d9-65105b287412.png)
To Reproduce Steps to reproduce the behavior: here is the example embedded webpage javascript
full webpage: embed-clear-on-reset-html.txt
Expected behavior The proactive trigger should be sent once the webchat is ready
Environment: