I figured out a solution if someone also needs this. Just run this javascript. Chat history gets saved on localStorage, this function only specifically clears those messages when loaded and nothing else, so it doesn’t mess with any other plugin config. It keeps the first message to display the initial default chat message from the bot
jsonMessages =JSON.parse(localStorage.getItem(“watson_bot_state”));
if(typeof(jsonMessages) != “undefined” && jsonMessages !== null) {
jsonMessages.messages.splice(1);
localStorage.setItem(“watson_bot_state”,JSON.stringify(jsonMessages));
}
That said, would be good to have this as an option for the plugin, but for my client’s needs, this solved perfectly.
-
This reply was modified 5 years, 2 months ago by advancedwind.
-
This reply was modified 5 years, 2 months ago by advancedwind.
-
This reply was modified 5 years, 2 months ago by advancedwind.