diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Travelynx/Controller/Profile.pm | 6 | ||||
-rw-r--r-- | lib/Travelynx/Model/Users.pm | 8 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/Travelynx/Controller/Profile.pm b/lib/Travelynx/Controller/Profile.pm index 3923773..ff69c43 100755 --- a/lib/Travelynx/Controller/Profile.pm +++ b/lib/Travelynx/Controller/Profile.pm @@ -183,9 +183,9 @@ sub profile { 'profile', name => $name, uid => $user->{id}, + privacy => $user, bio => $profile->{bio}{html}, metadata => $profile->{metadata}, - public_level => $user->{public_level}, is_self => $is_self, following => ( $relation and $relation eq 'follows' ) ? 1 : 0, follow_requested => ( $relation and $relation eq 'requests_follow' ) @@ -533,7 +533,7 @@ sub user_status { any => { template => 'user_status', name => $name, - public_level => $user->{public_level}, + privacy => $user, journey => $status, journey_visibility => $visibility, twitter => \%tw_data, @@ -615,7 +615,7 @@ sub status_card { $self->render( '_public_status_card', name => $name, - public_level => $user->{public_level}, + privacy => $user, journey => $status, journey_visibility => $visibility, from_profile => $self->param('profile') ? 1 : 0, diff --git a/lib/Travelynx/Model/Users.pm b/lib/Travelynx/Model/Users.pm index ade9711..809273f 100644 --- a/lib/Travelynx/Model/Users.pm +++ b/lib/Travelynx/Model/Users.pm @@ -186,10 +186,9 @@ sub get_privacy_by { if ( my $user = $res->hash ) { return { - id => $user->{id}, - name => $user->{name}, - public_level => $user->{public_level}, # todo remove? - default_visibility => $user->{public_level} & 0x7f, + id => $user->{id}, + name => $user->{name}, + default_visibility => $user->{public_level} & 0x7f, default_visibility_str => $visibility_itoa{ $user->{public_level} & 0x7f }, comments_visible => $user->{public_level} & 0x80 ? 1 : 0, @@ -414,7 +413,6 @@ sub get { notifications => $user->{notifications}, accept_follows => $user->{accept_follows} == 2 ? 1 : 0, accept_follow_requests => $user->{accept_follows} == 1 ? 1 : 0, - is_public => $user->{public_level}, default_visibility => $user->{public_level} & 0x7f, default_visibility_str => $visibility_itoa{ $user->{public_level} & 0x7f }, |