Skip to content

Commit

Permalink
feat(web): Auto open livechat if query param present (#17223)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
RunarVestmann and kodiakhq[bot] authored Dec 13, 2024
1 parent c13fd91 commit 231b35f
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 231b35f

Please sign in to comment.