This commit is contained in:
barisusakli
2015-07-14 17:03:28 -04:00
parent 2cb70ceccc
commit daf1a388eb
15 changed files with 118 additions and 30 deletions

View File

@@ -94,10 +94,11 @@ SocketMeta.rooms.getAll = function(socket, data, callback) {
socketCount: websockets.getSocketCount(),
users: {
categories: roomClients.categories ? roomClients.categories.length : 0,
recent: roomClients.recent_posts ? roomClients.recent_posts.length : 0,
recent: roomClients.recent_topics ? roomClients.recent_topics.length : 0,
unread: roomClients.unread_topics ? roomClients.unread_topics.length: 0,
popular: roomClients.popular_topics ? roomClients.popular_topics.length: 0,
topics: 0,
category: 0,
other: 0
category: 0
},
topics: {}
};
@@ -124,14 +125,6 @@ SocketMeta.rooms.getAll = function(socket, data, callback) {
}
}
for (var i in socketData.users) {
if (socketData.users.hasOwnProperty(i)) {
socketData.users.other -= socketData.users[i];
}
}
socketData.users.other += roomClients['online_users'].length;
var scoreKeys = Object.keys(scores),
mostActive = scoreKeys.sort();