mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 13:03:16 +00:00
Update ApiV1Controller, improve timeline account hydration
This commit is contained in:
parent
4e79c77282
commit
4d5614726f
1 changed files with 2 additions and 1 deletions
|
@ -2299,10 +2299,11 @@ class ApiV1Controller extends Controller
|
|||
->map(function($k) use($user, $napi) {
|
||||
try {
|
||||
$status = $napi ? StatusService::get($k) : StatusService::getMastodon($k);
|
||||
} catch(\Exception $e) {
|
||||
if(!$status || !isset($status['account']) || !isset($status['account']['id'])) {
|
||||
return false;
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$account = $napi ? AccountService::get($status['account']['id'], true) : AccountService::getMastodon($status['account']['id'], true);
|
||||
|
|
Loading…
Reference in a new issue