From b1676ef43cf072bba4ec7f722f9c04facc5b018e Mon Sep 17 00:00:00 2001 From: tjtanjin Date: Mon, 30 Sep 2024 01:21:45 +0800 Subject: [PATCH] fix: Fix default open chat window not working --- src/hooks/internal/useBotEffectInternal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/internal/useBotEffectInternal.tsx b/src/hooks/internal/useBotEffectInternal.tsx index 9df967f5..cce1bc76 100644 --- a/src/hooks/internal/useBotEffectInternal.tsx +++ b/src/hooks/internal/useBotEffectInternal.tsx @@ -55,6 +55,7 @@ export const useBotEffectInternal = () => { isScrolling, timeoutId, hasFlowStarted, + setIsChatWindowOpen, setTextAreaDisabled, setAudioToggledOn, setVoiceToggledOn, @@ -107,9 +108,10 @@ export const useBotEffectInternal = () => { setUpNotifications(); }, []) - // default setup for text area, audio and voice + // default setup for text area, chat window, audio and voice useEffect(() => { setTextAreaDisabled(settings.chatInput?.disabled as boolean); + setIsChatWindowOpen(settings.chatWindow?.defaultOpen as boolean); setAudioToggledOn(settings.audio?.defaultToggledOn as boolean); // delay required for default voice toggled on to work if it is set to true