summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-08-23 10:34:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-08-23 10:34:02 +0200
commitf6d56d3134f6045726cb1d4ed8700382575bb686 (patch)
tree82bdf8b59acfefd6fb001d6be807915834ee64a9 /lib/Travelynx.pm
parentd08c1ead330f80ef1ae5f477f6d47a45f5793bb0 (diff)
Add proper journey comment support
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm7
1 files changed, 5 insertions, 2 deletions
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} ) {