Merge pull request #5514 from pixelfed/staging

Update PublicApiController
pull/5551/head^2
daniel 2025-01-18 00:45:03 -07:00 zatwierdzone przez GitHub
commit 13af8c5133
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -730,6 +730,9 @@ class PublicApiController extends Controller
->map(function ($s) use ($user) {
try {
$status = StatusService::get($s->id, false);
if (! $status) {
return false;
}
} catch (\Exception $e) {
$status = false;
}
@ -740,6 +743,9 @@ class PublicApiController extends Controller
return $status;
})
->filter(function ($s) use ($onlyMedia) {
if (! $s) {
return false;
}
if ($onlyMedia) {
if (
! isset($s['media_attachments']) ||