aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Reports.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-03-15 13:10:41 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-03-20 09:14:33 +0000
commit79bbd50afd3b02144cd0e1441b54a329e5e0c04f (patch)
tree2ed095f37bbc13bcfc921e9ce3b2f81e5a61fb6c /perllib/FixMyStreet/Script/Reports.pm
parent8d69e4d3f20db5d122d711673346c4ce9adc4242 (diff)
Store contributed-as data.
Store if the report/update was created by someone using the contributed-as dropdown, and use that information to perhaps not send report-sent emails.
Diffstat (limited to 'perllib/FixMyStreet/Script/Reports.pm')
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index b8c3d6d0d..1d19ee283 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -294,6 +294,9 @@ sub _send_report_sent_email {
# Don't send 'report sent' text
return unless $row->user->email_verified;
+ my $contributed_as = $row->get_extra_metadata('contributed_as') || '';
+ return if $contributed_as eq 'body' || $contributed_as eq 'anonymous_user';
+
FixMyStreet::Email::send_cron(
$row->result_source->schema,
'confirm_report_sent.txt',