aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/Open311')
-rw-r--r--perllib/Open311/PopulateServiceList.pm8
-rwxr-xr-xperllib/Open311/PostServiceRequestUpdates.pm2
2 files changed, 8 insertions, 2 deletions
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm
index 20fca90b3..a3672770c 100644
--- a/perllib/Open311/PopulateServiceList.pm
+++ b/perllib/Open311/PopulateServiceList.pm
@@ -145,6 +145,8 @@ sub _handle_existing_contact {
my $service_name = $self->_normalize_service_name;
my $protected = $contact->get_extra_metadata("open311_protect");
+ return if $self->_current_body_cobrand && $self->_current_body_cobrand->call_hook(open311_skip_existing_contact => $contact);
+
print $self->_current_body->id . " already has a contact for service code " . $self->_current_service->{service_code} . "\n" if $self->verbose >= 2;
if ( $contact->state eq 'deleted' || $service_name ne $contact->category || $self->_current_service->{service_code} ne $contact->email ) {
@@ -370,7 +372,11 @@ sub _delete_contacts_not_in_service_list {
sub _delete_contacts_not_in_service_list_cobrand_overrides {
my ( $self, $found_contacts ) = @_;
- return $found_contacts;
+ if ($self->_current_body_cobrand && $self->_current_body_cobrand->can('open311_filter_contacts_for_deletion')) {
+ return $self->_current_body_cobrand->open311_filter_contacts_for_deletion($found_contacts);
+ } else {
+ return $found_contacts;
+ }
}
1;
diff --git a/perllib/Open311/PostServiceRequestUpdates.pm b/perllib/Open311/PostServiceRequestUpdates.pm
index d7345ea4d..a31bca8f7 100755
--- a/perllib/Open311/PostServiceRequestUpdates.pm
+++ b/perllib/Open311/PostServiceRequestUpdates.pm
@@ -50,7 +50,7 @@ sub open311_params {
my $conf = $body;
if ($comment) {
my $cobrand_logged = $comment->get_cobrand_logged;
- my $sender = $cobrand_logged->get_body_sender($body, $comment->problem->category);
+ my $sender = $cobrand_logged->get_body_sender($body, $comment->problem);
$conf = $sender->{config};
}