diff --git a/install/data/defaults.json b/install/data/defaults.json
index 8623adf960..f3859d2d0c 100644
--- a/install/data/defaults.json
+++ b/install/data/defaults.json
@@ -94,6 +94,8 @@
"min:rep:signature": 0,
"flags:limitPerTarget": 0,
"flags:autoFlagOnDownvoteThreshold": 0,
+ "flags:actionOnResolve": "rescind",
+ "flags:actionOnReject": "rescind",
"notificationType_upvote": "notification",
"notificationType_new-topic": "notification",
"notificationType_new-reply": "notification",
diff --git a/public/language/en-GB/admin/settings/reputation.json b/public/language/en-GB/admin/settings/reputation.json
index ae502f1edd..e790ec094f 100644
--- a/public/language/en-GB/admin/settings/reputation.json
+++ b/public/language/en-GB/admin/settings/reputation.json
@@ -23,5 +23,9 @@
"flags.limit-per-target-placeholder": "Default: 0",
"flags.limit-per-target-help": "When a post or user is flagged multiple times, each additional flag is considered a "report" and added to the original flag. Set this option to a number other than zero to limit the number of reports an item can receive.",
"flags.auto-flag-on-downvote-threshold": "Number of downvotes to auto flag posts (Set to 0 to disable, default: 0)",
- "flags.auto-resolve-on-ban": "Automatically resolve all of a user's tickets when they are banned"
+ "flags.auto-resolve-on-ban": "Automatically resolve all of a user's tickets when they are banned",
+ "flags.action-on-resolve": "Do the following when a flag is resolved",
+ "flags.action-on-reject": "Do the following when a flag is rejected",
+ "flags.action.nothing": "Do nothing",
+ "flags.action.rescind": "Rescind the notification send to moderators/administrators"
}
\ No newline at end of file
diff --git a/src/flags.js b/src/flags.js
index cca52bb292..7d8b5e43aa 100644
--- a/src/flags.js
+++ b/src/flags.js
@@ -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}`));
}
}
diff --git a/src/views/admin/settings/reputation.tpl b/src/views/admin/settings/reputation.tpl
index e82843d8f3..c9ac7d3acc 100644
--- a/src/views/admin/settings/reputation.tpl
+++ b/src/views/admin/settings/reputation.tpl
@@ -103,6 +103,26 @@
+