summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDerf Null <derf@finalrewind.org>2023-05-29 14:50:04 +0200
committerDerf Null <derf@finalrewind.org>2023-05-29 14:50:04 +0200
commit0f9519c40bca8583e3b0ec6a05850ce84ea2e686 (patch)
tree2ddddc1b9f7f9386e07ccb7e1684d2cffffcbd0d /lib/Travelynx.pm
parentaab9fa7fe295a5aeefe358dd8d6ce55f6c6ea978 (diff)
get_user_status_json_v1: expose comment
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 2b51921..2688556 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -1706,6 +1706,7 @@ sub startup {
$status->{checked_in}
or $status->{cancelled}
) ? \1 : \0,
+ comment => $status->{comment},
fromStation => {
ds100 => $status->{dep_ds100},
name => $status->{dep_name},
@@ -1750,7 +1751,12 @@ sub startup {
}
};
- if ( not $opt{public} ) {
+ if ( $opt{public} ) {
+ if ( not $privacy->{comments_visible} ) {
+ delete $ret->{comment};
+ }
+ }
+ else {
$ret->{actionTime}
= $status->{timestamp}
? $status->{timestamp}->epoch