summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/server.js b/server.js
index 07a6a9b..89b92d6 100644
--- a/server.js
+++ b/server.js
@@ -2267,8 +2267,10 @@ wss.on('connection', (socket, req) => {
let sid = login_cookie(req)
if (sid)
user_id = login_sql_select.get(sid)
- if (user_id)
+ if (user_id) {
socket.user = SQL_SELECT_USER_VIEW.get(user_id)
+ SQL_UPDATE_USER_LAST_SEEN.run(user_id)
+ }
socket.ip = req.headers["x-real-ip"] || req.ip || req.connection.remoteAddress || "0.0.0.0"
socket.title_id = req.query.title || "unknown"