Node.js based forum software built for the modern web
add filter:post.shouldQueue
Barış Soner Uşaklı9a3a5192c4d2
diff --git a/src/posts/queue.js b/src/posts/queue.jsindex 7e0e90720f..01836abba0 100644--- a/src/posts/queue.js+++ b/src/posts/queue.js@@ -8,6 +8,7 @@ var meta = require('../meta');var topics = require('../topics');var notifications = require('../notifications');var privileges = require('../privileges');+var plugins = require('../plugins');var socketHelpers = require('../socket.io/helpers');module.exports = function (Posts) {@@ -18,7 +19,14 @@ module.exports = function (Posts) {},function (userData, next) {var shouldQueue = parseInt(meta.config.postQueue, 10) === 1 && (!parseInt(uid, 10) || (parseInt(userData.reputation, 10) <= 0 && parseInt(userData.postcount, 10) <= 0));- next(null, shouldQueue);+ plugins.fireHook('filter:post.shouldQueue', {+ shouldQueue: shouldQueue,+ uid: uid,+ data: data,+ }, next);+ },+ function (result, next) {+ next(null, result.shouldQueue);},], callback);};