aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Reports.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-12-11 11:05:30 +0000
committerMatthew Somerville <matthew@mysociety.org>2019-12-11 11:32:21 +0000
commit698dc8fc34f728ca4d302f9f7ad0dc6801c5e259 (patch)
tree6139bf2d2297071de77ca803bb2e5ad929f4f98a /perllib/FixMyStreet/Script/Reports.pm
parentd31201ac8cbc724ecb04d1a4744186876d2d5f5b (diff)
[TfL] Fix reference ID in logged email.
If report made on .com, `body->get_cobrand_handler` does not return TfL as it covers many bodies. Now we have the body handler, we can use that instead.
Diffstat (limited to 'perllib/FixMyStreet/Script/Reports.pm')
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm9
1 files changed, 1 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index aed4e2fc6..73c179751 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -129,19 +129,12 @@ sub send(;$) {
$missing = join(' / ', @missing) if @missing;
}
- my $send_confirmation_email = $cobrand->report_sent_confirmation_email;
+ my $send_confirmation_email = $cobrand_handler->report_sent_confirmation_email;
my @dear;
my %reporters = ();
my $skip = 0;
while (my $body = $bodies->next) {
- # See if this body wants confirmation email (in case report made on national site, for example)
- if (my $cobrand_body = $body->get_cobrand_handler) {
- if (my $id_ref = $cobrand_body->report_sent_confirmation_email) {
- $send_confirmation_email = $id_ref;
- }
- }
-
my $sender_info = $cobrand->get_body_sender( $body, $row->category );
my $sender = "FixMyStreet::SendReport::" . $sender_info->{method};