mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-19 02:50:46 +00:00
Merge pull request #5514 from pixelfed/staging
Update PublicApiController
This commit is contained in:
commit
13af8c5133
1 changed files with 6 additions and 0 deletions
|
@ -730,6 +730,9 @@ class PublicApiController extends Controller
|
||||||
->map(function ($s) use ($user) {
|
->map(function ($s) use ($user) {
|
||||||
try {
|
try {
|
||||||
$status = StatusService::get($s->id, false);
|
$status = StatusService::get($s->id, false);
|
||||||
|
if (! $status) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$status = false;
|
$status = false;
|
||||||
}
|
}
|
||||||
|
@ -740,6 +743,9 @@ class PublicApiController extends Controller
|
||||||
return $status;
|
return $status;
|
||||||
})
|
})
|
||||||
->filter(function ($s) use ($onlyMedia) {
|
->filter(function ($s) use ($onlyMedia) {
|
||||||
|
if (! $s) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ($onlyMedia) {
|
if ($onlyMedia) {
|
||||||
if (
|
if (
|
||||||
! isset($s['media_attachments']) ||
|
! isset($s['media_attachments']) ||
|
||||||
|
|
Loading…
Reference in a new issue