using websockets

This commit is contained in:
barisusakli
2014-09-07 14:13:05 -04:00
parent 6cd84ebe81
commit 242721c73f
2 changed files with 4 additions and 4 deletions

View File

@@ -52,7 +52,7 @@ SocketPosts.reply = function(socket, data, callback) {
'downvote:disabled': parseInt(meta.config['downvote:disabled'], 10) === 1,
});
module.parent.exports.emitTopicPostStats();
websockets.emitTopicPostStats();
topics.pushUnreadCount();
}
});
@@ -214,7 +214,7 @@ function deleteOrRestore(command, socket, data, callback) {
return callback(err);
}
module.parent.exports.emitTopicPostStats();
websockets.emitTopicPostStats();
var eventName = command === 'restore' ? 'event:post_restored' : 'event:post_deleted';
websockets.server.sockets.in('topic_' + data.tid).emit(eventName, postData);
@@ -232,7 +232,7 @@ SocketPosts.purge = function(socket, data, callback) {
return callback(err);
}
module.parent.exports.emitTopicPostStats();
websockets.emitTopicPostStats();
websockets.server.sockets.in('topic_' + data.tid).emit('event:post_purged', data.pid);