This commit is contained in:
Julian Lam
2014-04-02 11:11:01 -04:00
parent 77a4c871f6
commit 90616c6e7b
2 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ SocketPosts.reply = function(socket, data, callback) {
posts: [postData]
};
index.server.sockets.emit('event:new_post', socketData);
index.server.sockets.in('topic_' + postData.tid).emit('event:new_post', socketData);
callback();
}

View File

@@ -124,7 +124,7 @@ module.exports = function(Topics) {
next(null, postData);
},
function(postData, next) {
Topics.getTopicsByTids([postData.tid], uid, function(err, topicData) {
Topics.getTopicsByTids([postData.tid], 0, function(err, topicData) {
if(err) {
return next(err);
}
@@ -222,8 +222,8 @@ module.exports = function(Topics) {
postData.index = index;
postData.favourited = false;
postData.votes = 0;
postData.display_moderator_tools = true;
postData.display_move_tools = privileges.admin || privileges.moderator;
postData.display_moderator_tools = false;
postData.display_move_tools = false;
postData.relativeTime = utils.toISOString(postData.timestamp);
next(null, postData);