diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Moderate.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Moderate.pm b/perllib/FixMyStreet/App/Controller/Moderate.pm index 4d3a97fa8..a8e0b7a3c 100644 --- a/perllib/FixMyStreet/App/Controller/Moderate.pm +++ b/perllib/FixMyStreet/App/Controller/Moderate.pm @@ -103,7 +103,7 @@ sub report_moderate_audit : Private { reason => (sprintf '%s (%s)', $reason, $types_csv), }); - if ($problem->user->email_verified) { + if ($problem->user->email_verified && $c->cobrand->send_moderation_notifications) { my $token = $c->model("DB::Token")->create({ scope => 'moderation', data => { id => $problem->id } diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 68d11f227..82455f262 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -1250,4 +1250,19 @@ sub social_auth_enabled { return $key_present && !$self->call_hook("social_auth_disabled"); } + +=head2 send_moderation_notifications + +Used to control whether an email is sent to the problem reporter when a report +is moderated. + +Note that this is called in the context of the cobrand used to perform the +moderation, so e.g. if a UK council cobrand disables the moderation +notifications and a report is moderated on fixmystreet.com, the email will +still be sent (because it wasn't disabled on the FixMyStreet cobrand). + +=cut + +sub send_moderation_notifications { 1 } + 1; |