sc-stateless-presence
sc-stateless-presence copied to clipboard
On Logout: Unset Presence
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 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
.