Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open MessageBird widget chat from JS code

I'm using messagebird omnichannel widget for my website. And put the snippet code already. The widget runs great BTW.

I did saw toggleChat function, but it can only hide the chat window.

How can I force-open the chat widget from javascript code ?

like image 809
Michael Yohanes Avatar asked Sep 19 '26 23:09

Michael Yohanes


1 Answers

MessageBird developer is here :)

Good catch! There was a small issue with toggleChat method.

We just fixed it and deployed the fix, you can use toggleChat() now.

As you mentioned, toggleChat should do it - to open/hide the widget, but it didn't work. The issue that we had was the following: you had to pass true to open the chat and pass false to close it. It is not obvious when we have the name of the method like toggleChat, I agree! :)

Anyway, it's fixed but feel free to reach me if you have any other questions about the widget or our other products.

like image 78
Maxim Chechenev Avatar answered Sep 21 '26 12:09

Maxim Chechenev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!