mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
Both issues ask the same question: which users are actively using WeKan, and for how long. The `lastConnectionDate` field already existed on the user schema but was only ever written from a commented-out, env-gated block in server/publications/users.js - so WeKan never actually recorded it. Accounts.onLogin now stamps it on every successful login (server/lastActiveOnLogin.js), and an open client session refreshes it every two minutes via a `usersHeartbeat` method (client/lastActiveHeartbeat.js, server/methods/lastActiveHeartbeat.js) - a periodic timestamp, not a WebSocket/real-time presence system, which is more than either issue asked for. Admin Panel / People gets a "Last active" column showing each user's timestamp with an online-now badge when it is within five minutes (models/lib/lastActive.js holds the pure recency check, reused by the unit test). "Last active" and "Online now" are added to en.i18n.json and translated into 203 other locale files; the remaining minority keep the English source as the untranslated-everywhere placeholder. Thanks to eccaw and xet7 ! Closes #3678, Closes #3734,