Files
talk/services/moderation/phases/premod.js
T
Gerardo GálvezandKiwi 8163b52301 Flag users as "Always premoderate" (#2145)
* Flag users as "Always premoderate"

Status can be set using the action dropdown in the People tab and in User Details.
Users flagged as "Always premoderate" will have their comments sent to the premod queue.
Users can be filtered with the Always Premoderate status.
Include Always Premoderate status changes in User History.
Add spanish translations.

* Reorder CSS as per cvle's suggestion

* Address second comment
2019-02-13 20:08:22 +01:00

24 lines
536 B
JavaScript

// This phase checks to see if the settings have premod enabled, if they do,
// the comment is premod, otherwise, it's just none.
module.exports = (
ctx,
comment,
{
asset: {
settings: { moderation },
},
}
) => {
// If the settings say that we're in premod mode, or the user is flagged as
// always premod, then the comment is in premod status.
if (moderation === 'PRE' || ctx.user.status.alwaysPremod.status === true) {
return {
status: 'PREMOD',
};
}
return {
status: 'NONE',
};
};