Picture of tsn
Registered 4 years 357 days
tsn Monday, 19 October 2020, 11:16 AM
How to determine if user is offline?
Hi guys, Could you please clarify how to determine if a user is offline? For example, from client API I can see the following presence updates when the user went offline: ``` presence":[{"contact":"tel:","activity":"","status":"open"},{"contact":"im:","activity":"","status":"closed"}]} ``` Is it correct to say that the user is offline if and only if for `im` the `activity` is empty and `status` is `closed`? Best regards, Sergey
Picture of Matthias Schertler (innovaphone)
Moderator Registered 12 years 192 days
Matthias Schertler (innovaphone) Monday, 19 October 2020, 11:25 AM
Re: How to determine if user is offline?
Hello Sergey,

the im status is sufficient for telling if the user is online or offline.
  • im status "closed" -> offline
  • im status "open" -> online
Best regards,
Matthias
Picture of tsn
Registered 4 years 357 days
tsn Monday, 19 October 2020, 12:37 PM
Re: How to determine if user is offline?
Hi Matthias,

Thank you for quick response. Very helpful.

Best regards,
Sergey
← You can define your color theme preference here