mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
closed #1322
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user