Skip to content

Node.js based forum software built for the modern web

closes #6316

Barış Soner Uşaklı7f9d9b765421
diff --git a/src/socket.io/user/status.js b/src/socket.io/user/status.js
index 8849f0210e..ccae98ff4c 100644
--- a/src/socket.io/user/status.js
+++ b/src/socket.io/user/status.js
@@ -39,6 +39,13 @@ module.exports = function (SocketUser) {
function (next) {
user.setUserFields(socket.uid, data, next);
},
+ function (next) {
+ if (status !== 'offline') {
+ user.updateOnlineUsers(socket.uid, next);
+ } else {
+ next();
+ }
+ },
function (next) {
var data = {
uid: socket.uid,