aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-12-06 13:24:58 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-12-13 13:32:31 +0000
commitae0449e38a8deb2bd88d904e006f55be137871cf (patch)
treefe9aee7de76b05041923e6681c3689adcbb8b268 /perllib/FixMyStreet/Script
parent83c2d924404740ff8ab5e7200a470fc28325ff6a (diff)
Store all successful send methods.
Diffstat (limited to 'perllib/FixMyStreet/Script')
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index 1ea98342c..04ad1c893 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -222,7 +222,9 @@ sub send(;$) {
for my $sender ( keys %reporters ) {
debug_print("sending using " . $sender, $row->id) if $debug_mode;
$sender = $reporters{$sender};
- $result *= $sender->send( $row, \%h );
+ my $res = $sender->send( $row, \%h );
+ $result *= $res;
+ $row->add_send_method($sender) if !$res;
if ( $sender->unconfirmed_counts) {
foreach my $e (keys %{ $sender->unconfirmed_counts } ) {
foreach my $c (keys %{ $sender->unconfirmed_counts->{$e} }) {