Update ApiV1Controller

This commit is contained in:
Daniel Supernault 2022-01-08 01:51:24 -07:00
parent 32bbcc12c3
commit da6312c2b0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -2532,7 +2532,7 @@ class ApiV1Controller extends Controller
}
$data = $ids->map(function($post) use($pid) {
$status = StatusService::getMastodon($post->id);
$status = StatusService::get($post->id);
if(!$status || !isset($status['id'])) {
return false;
@ -2542,7 +2542,7 @@ class ApiV1Controller extends Controller
return $status;
})
->filter(function($post) {
return $post && isset($post['id']);
return $post && isset($post['id']) && isset($post['account']);
})
->values();