Skip to content

Node.js based forum software built for the modern web

properly broadcasting a user.active change

Julian Lam64ca3d7444e4
diff --git a/src/user.js b/src/user.js
index bc250e1c5f..7b03bc4767 100644
--- a/src/user.js
+++ b/src/user.js
@@ -246,13 +246,13 @@ var config = require('../config.js'),
}
if (callback === undefined) {
- global.socket.emit('api:user.active.get', returnObj)
+ io.sockets.emit('api:user.active.get', returnObj)
} else {
callback(returnObj);
}
});
} else {
- global.socket.emit('api:user.active.get', returnObj)
+ io.sockets.emit('api:user.active.get', returnObj)
}
});
},