sc-stateless-presence icon indicating copy to clipboard operation
sc-stateless-presence copied to clipboard

On Logout: Unset Presence

Open jrvaja opened this issue 6 years ago • 1 comments

Hey Team, @jondubois This is very nice plugin for SocketCluster to manage Presence of user.

I would request you to suggest me best solution, once user logout it should unset the presence of the user. In other words, it will be great if we can handle the presence of the user manual events.

I emit the below function to unset authentication and unset user presence.

socket.on('logout', function () {
  socket.deauthenticate();
});

But sometime, it still shows online presence until I close the browser.

It will be highly appreciated if you could assist me in this case.

Best Regards,

jrvaja avatar Apr 16 '18 05:04 jrvaja

@jrvaja Not sure if this was the issue but there was a problem in v1.0.6 and below that if a socket was authenticated multiple times with different username then it's possible that some old usernames were not properly marked as offline. This was fixed in v1.0.7.

jondubois avatar Apr 29 '18 10:04 jondubois