Update PublicApiController, fix visibility for guests

pull/5915/head
Daniel Supernault 2025-04-05 04:02:53 -06:00
rodzic f972523853
commit 537e179537
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 23740873EE6F76A1
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -788,15 +788,11 @@ class PublicApiController extends Controller
private function determineVisibility($profile, $user)
{
if (! $user || ! isset($user->profile_id)) {
return [];
}
if (! $profile || ! isset($profile['id'])) {
return [];
}
if ($profile['id'] == $user->profile_id) {
if ($user && $profile['id'] == $user->profile_id) {
return ['public', 'unlisted', 'private'];
}