Node.js based forum software built for the modern web
up spam be gone
Barış Soner Uşaklı3551a3413861
diff --git a/install/package.json b/install/package.jsonindex 36d6add398..22585bf839 100644--- a/install/package.json+++ b/install/package.json@@ -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",diff --git a/src/topics/create.js b/src/topics/create.jsindex bc1091bf52..d8108beb70 100644--- a/src/topics/create.js+++ b/src/topics/create.js@@ -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);