summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/HAFAS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/HAFAS.pm')
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm19
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm
index e67eb3b..c24afd9 100644
--- a/lib/Travel/Status/DE/HAFAS.pm
+++ b/lib/Travel/Status/DE/HAFAS.pm
@@ -617,16 +617,12 @@ sub check_mgate {
sub add_message {
my ( $self, $json, $is_him ) = @_;
- my $short = $json->{txtS};
- my $text = $json->{txtN};
- my $type = $json->{type};
- my $code = $json->{code};
- my $prio = $json->{prio};
+ my $text = $json->{txtN};
+ my $code = $json->{code};
if ($is_him) {
- $short = $json->{head};
- $text = $json->{text};
- $code = $json->{hid};
+ $text = $json->{text};
+ $code = $json->{hid};
}
# Some backends use remL for operator information. We don't want that.
@@ -642,12 +638,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,
+ json => $json,
ref_count => 1,
);
push( @{ $self->{messages} }, $message );