From 1986cacd1518b876d11df31cde60b896d91a80cb Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Wed, 22 Nov 2017 10:43:25 +0000 Subject: Allow cobrands to disable moderation emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a new send_moderation_notifications method which can be overridden by cobrands to prevent “your report has been moderated” emails from being sent. Fixes mysociety/fixmystreet-commercial#936 --- perllib/FixMyStreet/App/Controller/Moderate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Moderate.pm') 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 } -- cgit v1.2.3