diff options
author | Dave Whiteland <dave@mysociety.org> | 2013-01-08 14:22:27 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2013-01-08 14:22:27 +0000 |
commit | 8083ae2f9e5d4d94882bb63761da1762ce7a2105 (patch) | |
tree | 5a5e941d48a32152f933be9897c858d553e91057 /bin/send-comments | |
parent | ecdcaf5fb1eba7055906cf2e0d1f02e91bae9eed (diff) |
allow FMB's devolved Open311 endpoints to updates (send-comments)
Diffstat (limited to 'bin/send-comments')
-rwxr-xr-x | bin/send-comments | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/send-comments b/bin/send-comments index 4955cb2f3..5a14098bf 100755 --- a/bin/send-comments +++ b/bin/send-comments @@ -78,6 +78,18 @@ while ( my $council = $councils->next ) { while ( my $comment = $comments->next ) { my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($comment->cobrand)->new(); + # actually this should be OK for any devolved endpoint if original Open311->can_be_devolved, presumably + if ( $cobrand->moniker eq "fixmybarangay") { + my $sender = $cobrand->get_council_sender( $council->area_id, undef, $comment->problem->category ); + my $config = $sender->{config}; + $o = Open311->new( + endpoint => $config->endpoint, + jurisdiction => $config->jurisdiction, + api_key => $config->api_key, + use_extended_updates => 1, # FMB uses extended updates + ); + } + if ( $comment->send_fail_count ) { next if bromley_retry_timeout( $comment ); } |