This commit is contained in:
barisusakli
2014-12-09 20:48:35 -05:00
parent 348d05d3d1
commit 2e04501224
4 changed files with 24 additions and 11 deletions

View File

@@ -70,9 +70,16 @@ SocketTopics.enter = function(socket, tid, callback) {
if (!parseInt(tid, 10) || !socket.uid) {
return;
}
SocketTopics.markAsRead(socket, [tid], callback);
websockets.updateRoomBrowsingText('topic_' + tid);
async.parallel({
markAsRead: function(next) {
SocketTopics.markAsRead(socket, [tid], next);
},
users: function(next) {
websockets.getUsersInRoom(socket.uid, 'topic_' + tid, next);
}
}, function(err, result) {
callback(err, result ? result.users : null);
});
};
SocketTopics.postcount = function(socket, tid, callback) {