Skip to content

Commit

Permalink
Auto open livechat if query param present
Browse files Browse the repository at this point in the history
  • Loading branch information
RunarVestmann committed Dec 13, 2024
1 parent 3719969 commit 005cc4c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ export const LiveChatIncChatPanel = ({
const n = useNamespace(namespace)

useEffect(() => {
if (!hasButtonBeenClicked && !showLauncher) {
const queryParam = new URLSearchParams(window.location.search).get('wa_lid')
if (
!hasButtonBeenClicked &&
!showLauncher &&
!(queryParam && ['t10', 't11'].includes(queryParam))
) {
return () => {
// No need for cleanup if we don't initialize widget
}
Expand Down

0 comments on commit 005cc4c

Please sign in to comment.