From 51b0080bcf939139554bbb730445fb2572d0f26e Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 16 Apr 2025 20:38:31 +0200 Subject: dbris: store him messages upon checkin as well --- lib/Travelynx/Model/InTransit.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/Travelynx/Model/InTransit.pm') diff --git a/lib/Travelynx/Model/InTransit.pm b/lib/Travelynx/Model/InTransit.pm index e8495b8..0215cb8 100644 --- a/lib/Travelynx/Model/InTransit.pm +++ b/lib/Travelynx/Model/InTransit.pm @@ -195,6 +195,7 @@ sub add { } elsif ( $journey and $stop ) { + # DBRIS my $line; if ( $train_suffix and $journey->number @@ -203,7 +204,6 @@ sub add { $line = $train_suffix; } - # DBRIS my @route; for my $j_stop ( $journey->route ) { push( @@ -229,6 +229,19 @@ sub add { ] ); } + my @messages; + for my $msg ( $journey->messages ) { + if ( not $msg->{ueberschrift} ) { + push( + @{ $data->{him_msg} }, + { + header => q{}, + prio => $msg->{prioritaet}, + lead => $msg->{text} + } + ); + } + } $db->insert( 'in_transit', { -- cgit v1.2.3