From 3d15025266d1fb049c02ff1b726efe350ec6fb39 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 11 Nov 2023 01:03:50 +0100 Subject: HAFAS/Message: expose message type (useful for filters) --- lib/Travel/Status/DE/HAFAS.pm | 2 ++ lib/Travel/Status/DE/HAFAS/Message.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status') diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index 3020ae2..e67eb3b 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -619,6 +619,7 @@ sub add_message { my $short = $json->{txtS}; my $text = $json->{txtN}; + my $type = $json->{type}; my $code = $json->{code}; my $prio = $json->{prio}; @@ -643,6 +644,7 @@ sub add_message { my $message = Travel::Status::DE::HAFAS::Message->new( short => $short, text => $text, + type => $type, code => $code, prio => $prio, is_him => $is_him, diff --git a/lib/Travel/Status/DE/HAFAS/Message.pm b/lib/Travel/Status/DE/HAFAS/Message.pm index 72d8e77..df49c5a 100644 --- a/lib/Travel/Status/DE/HAFAS/Message.pm +++ b/lib/Travel/Status/DE/HAFAS/Message.pm @@ -9,7 +9,7 @@ use parent 'Class::Accessor'; our $VERSION = '4.18'; Travel::Status::DE::HAFAS::Message->mk_ro_accessors( - qw(short text code prio is_him ref_count)); + qw(short type text code prio is_him ref_count)); sub new { my ( $obj, %conf ) = @_; -- cgit v1.2.3