aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/New.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 3d356cc40..c09b721b9 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1003,6 +1003,7 @@ sub save_user_and_report : Private {
# if there is a Message Manager message ID, pass it back to the client view
if ($c->req->param('mm_msg_id')) {
+ $c->stash->{mm_msg_id} = $c->req->param('mm_msg_id');
$report->service( $c->req->param('mm_msg_id') );
}
@@ -1068,7 +1069,13 @@ sub redirect_or_confirm_creation : Private {
if ( $report->confirmed ) {
# Subscribe problem reporter to email updates
$c->forward( 'create_reporter_alert' );
- my $report_uri = $c->uri_for( '/report', $report->id );
+ my $report_uri;
+
+ if ( $c->cobrand->moniker eq 'fixmybarangay' && $c->user->from_council && $c->stash->{mm_msg_id}) {
+ $report_uri = $c->uri_for( '/report', $report->id, undef, { mm_msg_id => $c->stash->{mm_msg_id} } );
+ } else {
+ $report_uri = $c->uri_for( '/report', $report->id );
+ }
$c->log->info($report->user->id . ' was logged in, redirecting to /report/' . $report->id);
$c->res->redirect($report_uri);
$c->detach;