diff options
author | Derf Null <derf@finalrewind.org> | 2023-06-26 20:53:08 +0200 |
---|---|---|
committer | Derf Null <derf@finalrewind.org> | 2023-06-26 20:53:08 +0200 |
commit | 8cb0de1b702eda1c8fb5b6ed795d769822999d75 (patch) | |
tree | aa3a93ab0fd8ebdabb60daef6468bacaa6090cfe /lib/Travelynx.pm | |
parent | f0be693811bdba2f7a1328944c7820353f392cff (diff) |
compute effective visibility in database view
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-x | lib/Travelynx.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 0359b7b..7a5f38c 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1467,7 +1467,10 @@ sub startup { extra_data => $in_transit->{data}, comment => $in_transit->{user_data}{comment}, visibility => $in_transit->{visibility}, - visibility_str => $in_transit->{visibility_str}, + visibility_str => $in_transit->{visibility_str}, + effective_visibility => $in_transit->{effective_visibility}, + effective_visibility_str => + $in_transit->{effective_visibility_str}, }; my $traewelling = $self->traewelling->get( @@ -1702,6 +1705,9 @@ sub startup { comment => $latest->{user_data}{comment}, visibility => $latest->{visibility}, visibility_str => $latest->{visibility_str}, + effective_visibility => $latest->{effective_visibility}, + effective_visibility_str => + $latest->{effective_visibility_str}, }; } @@ -1765,13 +1771,8 @@ sub startup { }, intermediateStops => [], visibility => { - level => $status->{visibility} - // $privacy->{default_visibility}, - desc => ( - $status->{visibility_str} eq 'default' - ? $privacy->{default_visibility_str} - : $status->{visibility_str} - ), + level => $status->{effective_visibility}, + desc => $status->{effective_visibility_str}, } }; |