#2200 actually fix dupe colors, show 10 topics

This commit is contained in:
barisusakli
2014-10-19 15:59:33 -04:00
parent 304f5b1c76
commit 4db31be7e3
2 changed files with 5 additions and 2 deletions

View File

@@ -125,9 +125,12 @@ SocketMeta.rooms.getAll = function(socket, data, callback) {
topTenTopics = topTenTopics.concat(scores[mostActive.pop()]);
}
topTenTopics = topTenTopics.slice(0,9);
topTenTopics = topTenTopics.slice(0, 10);
topics.getTopicsFields(topTenTopics, ['title'], function(err, titles) {
if (err) {
return callback(err);
}
topTenTopics.forEach(function(tid, id) {
socketData.topics[tid] = {
value: rooms['/topic_' + tid].length,