kopia lustrzana https://github.com/pixelfed/pixelfed
Update PublicApiController, fix visibility for guests
rodzic
f972523853
commit
537e179537
|
@ -788,15 +788,11 @@ class PublicApiController extends Controller
|
||||||
|
|
||||||
private function determineVisibility($profile, $user)
|
private function determineVisibility($profile, $user)
|
||||||
{
|
{
|
||||||
if (! $user || ! isset($user->profile_id)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! $profile || ! isset($profile['id'])) {
|
if (! $profile || ! isset($profile['id'])) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($profile['id'] == $user->profile_id) {
|
if ($user && $profile['id'] == $user->profile_id) {
|
||||||
return ['public', 'unlisted', 'private'];
|
return ['public', 'unlisted', 'private'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue