• Resolved advancedwind

    (@advancedwind)


    Hello everyone.

    Is there a way to disable the chat history on the chatbox popup? I’m basically talking about the “trash” button function, but enabled by default on a new page load. A solution that involves some programming and changing the plugin code is acceptable.

    • This topic was modified 4 years, 10 months ago by advancedwind.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter advancedwind

    (@advancedwind)

    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 4 years, 10 months ago by advancedwind.
    • This reply was modified 4 years, 10 months ago by advancedwind.
    • This reply was modified 4 years, 10 months ago by advancedwind.
    Plugin Author intelahelp

    (@intelahelp)

    Hello @advancedwind.

    Thanks for your idea. We consider such functionality. Perhaps we will add this in future releases.
    If you have more questions, don’t hesitate to ask them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disabling chat history on front end’ is closed to new replies.