aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-08 15:23:01 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-09 11:55:38 +0100
commit2827f68c5ca7cf98d89dc7ae28277aa27e87fb06 (patch)
treec3b124d5110bcb6214a608687b475b9a105f7d07 /perllib
parent67190a155ece50b95941fcfff453fe140ab1bb75 (diff)
Remove hard-coded body name in Problem.
We can now use the new open311_post_update_skip function.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 113de6c35..2192158d3 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -896,8 +896,9 @@ sub updates_sent_to_body {
return unless $self->send_method_used && $self->send_method_used eq 'Open311';
# Some bodies only send updates *to* FMS, they don't receive updates.
- # NB See also the list in bin/send-comments
- my $excluded = qr{Lewisham|Oxfordshire};
+ my $cobrand = $self->get_cobrand_logged;
+ my $handler = $cobrand->call_hook(get_body_handler_for_problem => $self);
+ return 0 if $handler && $handler->call_hook('open311_post_update_skip');
my @bodies = values %{ $self->bodies };
my @updates_sent = grep {
@@ -905,8 +906,7 @@ sub updates_sent_to_body {
(
$_->send_method eq 'Open311' ||
$_->send_method eq 'Noop' # Sending might be temporarily disabled
- ) &&
- !($_->name =~ /$excluded/)
+ )
} @bodies;
return scalar @updates_sent;
}