2
0

(chatwoot) Unmount Typebot embed bubble when opening chatwoot

Closes #1007
This commit is contained in:
Baptiste Arnaud
2023-11-06 16:57:05 +01:00
parent b2b82c48e1
commit eed562b47a
11 changed files with 40 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ const parseChatwootOpenCode = ({
typebotId,
}: ChatwootOptions & { typebotId: string; resultId: string }) => {
const openChatwoot = `${parseSetUserCode(user, resultId)}
if(window.Typebot?.unmount) window.Typebot.unmount();
window.$chatwoot.setCustomAttributes({
typebot_result_url: "${
env.NEXTAUTH_URL