Hi, I am trying to show the online status of a user in my app.
A collection called
users
contains additional profile fields and the online status like
online
,
away
or
offline
.
With the create trigger I am able to create a new user. With
login
tigger I could set the status to online (not necessary, because I could set it in from the app too).
away
is set by the app.
But
offline
is more difficult to set. If the user closes the app, I can listen to a close event and update the status to
offline
. But if the app crashes or the user has no internet connection, I can not update the status.
My idea is to add a Authentication Logout trigger. But maybe you have a better idea?
Thanks