lets-chat
lets-chat copied to clipboard
When does a user connect and disconnect ?
I was asked to discover when a specific user logged in let's chat and I can't find where I may have this information ? I use LDAP for the authentication.
In MongoDB ? I can see sessions but I can't link them to users In Nginx's access log ? I find things like /socket.io/?EIO=3&transport=polling&t=1511680349141-0 and /socket.io/?EIO=3&transport=polling&t=1511791115736-3&sid=cAzuNdX-8-k8VevhAAJp but can't link those either.
So, is there a way to find out when a user came and leaved the system ?
I'm wondering if some external Node.js modules could be used :
Any idea on how to implement them ?
It's not stored anywhere, but you can probably add some code when a user connects around here: https://github.com/sdelements/lets-chat/blob/1ae835fea4db48ea1ab0166991f1268df6241a96/app/controllers/presence.js#L29