From f6d56d3134f6045726cb1d4ed8700382575bb686 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 23 Aug 2019 10:34:02 +0200 Subject: Add proper journey comment support --- lib/Travelynx.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx.pm') diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index ba34d8a..3af35c2 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -325,8 +325,8 @@ sub startup { }; if ( $opt{comment} ) { - $entry->{messages} - = JSON->new->encode( [ [ 0, $opt{comment} ] ] ); + $entry->{user_data} + = JSON->new->encode( { comment => $opt{comment} } ); } my $journey_id = undef; @@ -2228,6 +2228,9 @@ sub startup { messages => $entry->{messages}, route => $entry->{route}, edited => $entry->{edited}, + comment => $entry->{user_data} + ? $entry->{user_data}{comment} + : undef, }; if ( $opt{verbose} ) { -- cgit v1.2.3