diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bexley.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index b1d300783..1b960f206 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -128,6 +128,12 @@ sub open311_post_send { ); my %lighting = map { $_ => 1 } @lighting; + my @flooding = ( + 'Flooding in the road', + 'Blocked rainwater gulleys', + ); + my %flooding = map { $_ => 1 } @flooding; + my $emails = $self->feature('open311_email') || return; my $dangerous = $row->get_extra_field_value('dangerous') || ''; my $reportType = $row->get_extra_field_value('reportType') || ''; @@ -148,6 +154,10 @@ sub open311_post_send { my @lighting = split /,/, $emails->{lighting}; push @to, [ $_, 'FixMyStreet Bexley Street Lighting' ] for @lighting; } + if ($flooding{$row->category} && $emails->{flooding}) { + my @flooding = split /,/, $emails->{flooding}; + push @to, [ $_, 'FixMyStreet Bexley Flooding' ] for @flooding; + } return unless @to; my $sender = FixMyStreet::SendReport::Email->new( to => \@to ); |