lets-chat icon indicating copy to clipboard operation
lets-chat copied to clipboard

When does a user connect and disconnect ?

Open mmeinert opened this issue 7 years ago • 2 comments

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 ?

mmeinert avatar Nov 27 '17 15:11 mmeinert

I'm wondering if some external Node.js modules could be used :

Any idea on how to implement them ?

mmeinert avatar Dec 04 '17 06:12 mmeinert

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

hhaidar avatar Jan 11 '18 07:01 hhaidar