Skip to content

Commit

Permalink
Merge pull request #5514 from pixelfed/staging
Browse files Browse the repository at this point in the history
Update PublicApiController
  • Loading branch information
dansup authored Jan 18, 2025
2 parents 0cc9ed3 + 629fb5a commit 13af8c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Http/Controllers/PublicApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,9 @@ public function accountStatuses(Request $request, $id)
->map(function ($s) use ($user) {
try {
$status = StatusService::get($s->id, false);
if (! $status) {
return false;
}
} catch (\Exception $e) {
$status = false;
}
Expand All @@ -740,6 +743,9 @@ public function accountStatuses(Request $request, $id)
return $status;
})
->filter(function ($s) use ($onlyMedia) {
if (! $s) {
return false;
}
if ($onlyMedia) {
if (
! isset($s['media_attachments']) ||
Expand Down

0 comments on commit 13af8c5

Please sign in to comment.