summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-11-11 01:03:50 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2023-11-11 01:03:50 +0100
commit3d15025266d1fb049c02ff1b726efe350ec6fb39 (patch)
tree6aca7ae8964498a2a23b3bb9adae15f70a4686fc /lib/Travel/Status
parent5807b0b705e1e84e0845edc4e03ca7297ce42e72 (diff)
HAFAS/Message: expose message type (useful for filters)
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm2
-rw-r--r--lib/Travel/Status/DE/HAFAS/Message.pm2
2 files changed, 3 insertions, 1 deletions
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 ) = @_;