diff options
author | Struan Donald <struan@exo.org.uk> | 2018-12-14 16:58:32 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-01-04 10:35:49 +0000 |
commit | 2da0a37f3c72dae02044b184a8d9c73202947cc1 (patch) | |
tree | 1effaf3e183f31fa5d0708f0d8d4efdc967d95f2 /perllib/Open311/GetServiceRequests.pm | |
parent | cd4c9634b73eea847a1436f201e44de9c7e04d69 (diff) |
[Open311] run cobrand description filtering if available
When fetching reports run them through the cobrands
filter_report_description method if it exists.
Diffstat (limited to 'perllib/Open311/GetServiceRequests.pm')
-rw-r--r-- | perllib/Open311/GetServiceRequests.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/Open311/GetServiceRequests.pm b/perllib/Open311/GetServiceRequests.pm index a8f3788d5..8a48cc6f4 100644 --- a/perllib/Open311/GetServiceRequests.pm +++ b/perllib/Open311/GetServiceRequests.pm @@ -154,6 +154,10 @@ sub create_problems { next; } + if ( my $cobrand = $body->get_cobrand_handler ) { + my $filtered = $cobrand->call_hook('filter_report_description', $request->{description}); + $request->{description} = $filtered if defined $filtered; + } my @contacts = grep { $request->{service_code} eq $_->email } $contacts->all; my $contact = $contacts[0] ? $contacts[0]->category : 'Other'; |