get_user_status_json_v1: expose comment

This commit is contained in:
Derf Null 2023-05-29 14:50:04 +02:00
parent aab9fa7fe2
commit 0f9519c40b
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -1706,6 +1706,7 @@ sub startup {
$status->{checked_in} $status->{checked_in}
or $status->{cancelled} or $status->{cancelled}
) ? \1 : \0, ) ? \1 : \0,
comment => $status->{comment},
fromStation => { fromStation => {
ds100 => $status->{dep_ds100}, ds100 => $status->{dep_ds100},
name => $status->{dep_name}, 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} $ret->{actionTime}
= $status->{timestamp} = $status->{timestamp}
? $status->{timestamp}->epoch ? $status->{timestamp}->epoch