mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 19:11:22 +01:00
up spam be gone
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
"nodebb-plugin-markdown": "8.3.0",
|
||||
"nodebb-plugin-mentions": "2.2.3",
|
||||
"nodebb-plugin-soundpack-default": "1.0.0",
|
||||
"nodebb-plugin-spam-be-gone": "0.5.1",
|
||||
"nodebb-plugin-spam-be-gone": "0.5.2",
|
||||
"nodebb-rewards-essentials": "0.0.11",
|
||||
"nodebb-theme-lavender": "5.0.1",
|
||||
"nodebb-theme-persona": "7.2.20",
|
||||
|
||||
@@ -209,18 +209,17 @@ module.exports = function (Topics) {
|
||||
var uid = data.uid;
|
||||
var content = data.content;
|
||||
var postData;
|
||||
var cid;
|
||||
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
Topics.getTopicField(tid, 'cid', next);
|
||||
},
|
||||
function (_cid, next) {
|
||||
cid = _cid;
|
||||
function (cid, next) {
|
||||
data.cid = cid;
|
||||
async.parallel({
|
||||
topicData: async.apply(Topics.getTopicData, tid),
|
||||
canReply: async.apply(privileges.topics.can, 'topics:reply', tid, uid),
|
||||
isAdminOrMod: async.apply(privileges.categories.isAdminOrMod, cid, uid),
|
||||
isAdminOrMod: async.apply(privileges.categories.isAdminOrMod, data.cid, uid),
|
||||
}, next);
|
||||
},
|
||||
function (results, next) {
|
||||
@@ -243,7 +242,7 @@ module.exports = function (Topics) {
|
||||
guestHandleValid(data, next);
|
||||
},
|
||||
function (next) {
|
||||
user.isReadyToPost(uid, cid, next);
|
||||
user.isReadyToPost(uid, data.cid, next);
|
||||
},
|
||||
function (next) {
|
||||
plugins.fireHook('filter:topic.reply', data, next);
|
||||
@@ -284,7 +283,7 @@ module.exports = function (Topics) {
|
||||
}
|
||||
|
||||
Topics.notifyFollowers(postData, uid);
|
||||
analytics.increment(['posts', 'posts:byCid:' + cid]);
|
||||
analytics.increment(['posts', 'posts:byCid:' + data.cid]);
|
||||
plugins.fireHook('action:topic.reply', { post: _.clone(postData) });
|
||||
|
||||
next(null, postData);
|
||||
|
||||
Reference in New Issue
Block a user