Skip to content

Node.js based forum software built for the modern web

closed #1322

Julian Lam90616c6e7b48
diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js
index ad38842402..93b7a90416 100644
--- a/src/socket.io/posts.js
+++ b/src/socket.io/posts.js
@@ -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();
}
diff --git a/src/topics/create.js b/src/topics/create.js
index 71b941ae50..a2ff056d69 100644
--- a/src/topics/create.js
+++ b/src/topics/create.js
@@ -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);