mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-18 10:30:45 +00:00
Update PublicApiController
This commit is contained in:
parent
22eae69fd5
commit
629fb5a47a
1 changed files with 6 additions and 0 deletions
|
@ -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']) ||
|
||||
|
|
Loading…
Reference in a new issue