Skip to content

Commit

Permalink
HAFAS/Message: expose message type (useful for filters)
Browse files Browse the repository at this point in the history
  • Loading branch information
derf committed Nov 11, 2023
1 parent 5807b0b commit 3d15025
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/Travel/Status/DE/HAFAS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/Travel/Status/DE/HAFAS/Message.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) = @_;
Expand Down

0 comments on commit 3d15025

Please sign in to comment.