using websockets

v1.18.x
barisusakli 11 years ago
parent 6cd84ebe81
commit 242721c73f

@ -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);

@ -49,7 +49,7 @@ SocketTopics.post = function(socket, data, callback) {
posts: result.postData
});
module.parent.exports.emitTopicPostStats();
websockets.emitTopicPostStats();
topics.pushUnreadCount();
callback(null, result.topicData);

Loading…
Cancel
Save