From 1e65cb69bb7dcab032d36c9c07d2eeb931e0659f Mon Sep 17 00:00:00 2001 From: Morten Mikalsen Date: Tue, 19 Mar 2024 08:29:36 +0100 Subject: [PATCH] Clears chat conversation cookie on chat close --- src/komponenter/footer/chatbot/ChatbotWrapper.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/komponenter/footer/chatbot/ChatbotWrapper.tsx b/src/komponenter/footer/chatbot/ChatbotWrapper.tsx index aad879a36..0acdffd9f 100644 --- a/src/komponenter/footer/chatbot/ChatbotWrapper.tsx +++ b/src/komponenter/footer/chatbot/ChatbotWrapper.tsx @@ -136,6 +136,9 @@ export const ChatbotWrapper = () => { boost.chatPanel.setFilterValues(ev.detail.filterValue); if (ev.detail.nextId) boost.chatPanel.triggerAction(ev.detail.nextId); }); + boost.chatPanel.addEventListener('chatPanelClosed', () => { + removeCookie(conversationCookieName); + }); if (bufferLoad) { setBufferLoad(false);