summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm27
1 files changed, 24 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 8cf1722..80768ce 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -570,7 +570,7 @@ sub user_status {
);
my $visibility;
- if ( $status->{checked_in} ) {
+ if ( $status->{checked_in} or $status->{arr_name} ) {
$visibility
= $self->compute_effective_visibility(
$user->{default_visibility_str},
@@ -589,8 +589,15 @@ sub user_status {
)
{
$status->{checked_in} = 0;
+ $status->{arr_name} = undef;
}
}
+ if ( not $status->{checked_in}
+ and $status->{arr_name}
+ and not $user->{past_status} )
+ {
+ $status->{arr_name} = undef;
+ }
if ( $status->{checked_in} ) {
$og_data{url} .= '/' . $status->{sched_departure}->epoch;
@@ -640,7 +647,7 @@ sub public_profile {
my $status = $self->get_user_status( $user->{id} );
my $visibility;
- if ( $status->{checked_in} ) {
+ if ( $status->{checked_in} or $status->{arr_name} ) {
$visibility
= $self->compute_effective_visibility(
$user->{default_visibility_str},
@@ -659,8 +666,15 @@ sub public_profile {
)
{
$status->{checked_in} = 0;
+ $status->{arr_name} = undef;
}
}
+ if ( not $status->{checked_in}
+ and $status->{arr_name}
+ and not $user->{past_status} )
+ {
+ $status->{arr_name} = undef;
+ }
my %opt = (
uid => $user->{id},
@@ -855,7 +869,7 @@ sub public_status_card {
my $status = $self->get_user_status( $user->{id} );
my $visibility;
- if ( $status->{checked_in} ) {
+ if ( $status->{checked_in} or $status->{arr_name} ) {
$visibility
= $self->compute_effective_visibility(
$user->{default_visibility_str},
@@ -874,8 +888,15 @@ sub public_status_card {
)
{
$status->{checked_in} = 0;
+ $status->{arr_name} = undef;
}
}
+ if ( not $status->{checked_in}
+ and $status->{arr_name}
+ and not $user->{past_status} )
+ {
+ $status->{arr_name} = undef;
+ }
$self->render(
'_public_status_card',