This commit is contained in:
Barış Soner Uşaklı
2019-07-29 18:26:29 -04:00
parent 4d6b687183
commit 6a289fbac9
6 changed files with 31 additions and 19 deletions

View File

@@ -16,7 +16,7 @@ var socketHelpers = require('../socket.io/helpers');
module.exports = function (Posts) {
Posts.shouldQueue = async function (uid, data) {
const userData = await user.getUserFields(uid, ['uid', 'reputation', 'postcount']);
const shouldQueue = meta.config.postQueue && (!userData.uid || userData.reputation < meta.config.newbiePostDelayThreshold || userData.postcount <= 0);
const shouldQueue = meta.config.postQueue && (!userData.uid || userData.reputation < meta.config.postQueueReputationThreshold || userData.postcount <= 0);
const result = await plugins.fireHook('filter:post.shouldQueue', {
shouldQueue: !!shouldQueue,
uid: uid,