Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setChatView() alongside setHelpdeskView() method #25

Open
partyparrotgreg opened this issue Dec 11, 2023 · 1 comment
Open

Add setChatView() alongside setHelpdeskView() method #25

partyparrotgreg opened this issue Dec 11, 2023 · 1 comment

Comments

@partyparrotgreg
Copy link

Hey, I see I can set the Helpdesk View (Crisp.chat.setHelpdeskView()) but I can't do a similar thing to switch to Chat View (e.g. Crisp.chat.setChatView()). This could be handy for hooking up my UI elements to the desired action (either talking to someone or checking the helpdesk topics). Small thing but IMHO it improves the experience.

I tried to fork and add it on my own, but it looks like I can't toggle between Chat and Helpdesk view with the $crisp.push(["do", "chat:open"]) method.

  setHelpdeskView() {
    this.parent.createSingletonIfNecessary();

    window.$crisp.push(['do', 'helpdesk:search']);
  }

  setChatView() {
    this.parent.createSingletonIfNecessary(); // or this.parent.autoInjectIfNecessary(); ?

    window.$crisp.push(['do', 'chat:open']);
  }

Let me know what am I doing wrong 😅
Cheers

@eliottvincent
Copy link
Member

Hey! The thing is that this is simply not natively possible with our underlying JS SDK, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants