summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-11-26 20:04:14 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-11-26 20:04:14 +0100
commitb0822cc5a59da117d39d4ad0b21665cfd9f57315 (patch)
treebdac0475fa160dc4e56aad059af393e1105cfdf7 /lib
parentafcbe927aca4d5ff86a326a6751a924d2d371113 (diff)
Prune HAFAS messages which are already known from IRIS2.3.15
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 668fb71..1935c25 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -1034,6 +1034,12 @@ sub handle_request {
[ $message->{header}, $message->{lead} ] );
}
}
+ for my $message ( @{ $departures[-1]{moreinfo} // [] } ) {
+ my $m = $message->[1];
+ @him_messages
+ = grep { $_->[0] !~ m{Information\. $m\.$} }
+ @him_messages;
+ }
unshift( @{ $departures[-1]{moreinfo} }, @him_messages );
}
}