How can I use this package to call a function on the server when a user is offline?
Closed this issue · 1 comments
sferoze commented
When the user is completely offline, meaning not connected to my app through any client (phone, desktop, laptop, etc) I want to run a function on the server.
How can I do that with this package?
sampaiodiego commented
you can use the setStatus
event and check if the status
was changed to offline:
UserPresenceEvents.on('setStatus', (session, status, metadata) => {
if (status === 'offline') {
}
})