Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2021-02-16 18:23:55

Portella
New member
Registered: 2021-02-13
Posts: 6

Widget detect on-line and off-line change

Hello!

I am using the widget through a call to showWidget event by clicking on an image inside my app.

After clicking the icon the first time, it opens according to the current status. If the operator changes status, the widget continues to open as if it were still in the previous status. It does not recognize that the operator's status has changed.

Everything works perfectly, I just couldn't do it. Is there any way to do this?

EDITED: I forgot to say that I detect the status change (restapi/isonline), change the color of the icon, and then click.

Thank you and congratulations for the excellent tool!

Last edited by Portella (2021-02-16 19:06:27)

Offline

#2 2021-02-16 20:09:27

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Widget detect on-line and off-line change

1. By default if operator goes online there is this setting based on which status widget changes automatically.
https://doc.livehelperchat.com/docs/int … d-visitors
2. I don't think that widget cotnent itself changes if widget is opened.
3. But you can try to call this function to reload widget - https://doc.livehelperchat.com/docs/jav … oad-widget

Offline

#3 2021-02-16 20:37:22

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Widget detect on-line and off-line change

Read from this and one paragraph below how to have it manually set.
https://doc.livehelperchat.com/docs/jav … idget-open

Offline

#4 2021-02-17 14:38:13

Portella
New member
Registered: 2021-02-13
Posts: 6

Re: Widget detect on-line and off-line change

Hello,

Both suggestions worked perfectly for the first status change, they detected normally. However, when I change the status again, the change is not detected.

It seems to me that "window.$_LHC.attributes['onlineStatus'].next(true / false)" isn't making a difference. I'm running this when I detect that the status has changed.

Offline

#5 2021-02-17 14:38:57

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Widget detect on-line and off-line change

Sorry, but all works here.

Offline

Board footer