From e7ebd44f22e3aa8cf36eca99128e446feaeec387 Mon Sep 17 00:00:00 2001 From: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:15:21 -0300 Subject: [PATCH] fix: Blinking UI colors when finishing a Livechat conversation. (#31752) Co-authored-by: Martin Schoeler <20868078+MartinSchoeler@users.noreply.github.com> --- .changeset/silver-chicken-learn.md | 5 +++++ packages/livechat/src/lib/room.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/silver-chicken-learn.md diff --git a/.changeset/silver-chicken-learn.md b/.changeset/silver-chicken-learn.md new file mode 100644 index 000000000000..3257849ba45c --- /dev/null +++ b/.changeset/silver-chicken-learn.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/livechat": patch +--- + +fixed livechat UI blinking different colors when the chat is finished diff --git a/packages/livechat/src/lib/room.js b/packages/livechat/src/lib/room.js index ad447726d9b0..1e4f975f1886 100644 --- a/packages/livechat/src/lib/room.js +++ b/packages/livechat/src/lib/room.js @@ -29,7 +29,9 @@ export const closeChat = async ({ transcriptRequested } = {}) => { if (clearLocalStorageWhenChatEnded) { // exclude UI-affecting flags - const { minimized, visible, undocked, expanded, businessUnit, ...initial } = initialState(); + const { iframe: currentIframe } = store.state; + const { minimized, visible, undocked, expanded, businessUnit, config, iframe, ...initial } = initialState(); + initial.iframe = { ...currentIframe, guest: {} }; await store.setState(initial); }