mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 10:25:46 +02:00
closes #4394
This commit is contained in:
@@ -32,7 +32,7 @@ module.exports = function(SocketPosts) {
|
||||
plugins.fireHook('filter:post.tools', {pid: data.pid, uid: socket.uid, tools: []}, next);
|
||||
},
|
||||
postSharing: function(next) {
|
||||
social.getPostSharing(next);
|
||||
social.getActivePostSharing(next);
|
||||
}
|
||||
}, function(err, results) {
|
||||
if (err) {
|
||||
|
||||
@@ -6,6 +6,7 @@ var topics = require('../../topics');
|
||||
var privileges = require('../../privileges');
|
||||
var meta = require('../../meta');
|
||||
var utils = require('../../../public/src/utils');
|
||||
var social = require('../../social');
|
||||
|
||||
module.exports = function(SocketTopics) {
|
||||
|
||||
@@ -68,6 +69,9 @@ module.exports = function(SocketTopics) {
|
||||
},
|
||||
posts: function(next) {
|
||||
topics.getTopicPosts(data.tid, set, start, stop, socket.uid, reverse, next);
|
||||
},
|
||||
postSharing: function (next) {
|
||||
social.getActivePostSharing(next);
|
||||
}
|
||||
}, function(err, topicData) {
|
||||
if (err) {
|
||||
@@ -81,7 +85,7 @@ module.exports = function(SocketTopics) {
|
||||
topicData['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1;
|
||||
topicData['downvote:disabled'] = parseInt(meta.config['downvote:disabled'], 10) === 1;
|
||||
|
||||
topics.modifyPostsByPrivilege(topicData.posts, results.privileges);
|
||||
topics.modifyPostsByPrivilege(topicData, results.privileges);
|
||||
callback(null, topicData);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user