mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 01:10:31 +01:00
feat: introduce ACP defined option to rescind notif or do nothing on flag resolve/reject
/cc #10867
This commit is contained in:
@@ -679,7 +679,10 @@ Flags.update = async function (flagId, uid, changeset) {
|
||||
} else {
|
||||
tasks.push(db.sortedSetAdd(`flags:byState:${changeset[prop]}`, now, flagId));
|
||||
tasks.push(db.sortedSetRemove(`flags:byState:${current[prop]}`, flagId));
|
||||
if (changeset[prop] === 'resolved' || changeset[prop] === 'rejected') {
|
||||
if (changeset[prop] === 'resolved' && meta.config['flags:actionOnResolve'] === 'rescind') {
|
||||
tasks.push(notifications.rescind(`flag:${current.type}:${current.targetId}`));
|
||||
}
|
||||
if (changeset[prop] === 'rejected' && meta.config['flags:actionOnReject'] === 'rescind') {
|
||||
tasks.push(notifications.rescind(`flag:${current.type}:${current.targetId}`));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user