mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update PublicApiController, fix public timeline endpoint
This commit is contained in:
parent
80c7def3df
commit
dcb7ba9c7a
1 changed files with 6 additions and 1 deletions
|
@ -323,6 +323,9 @@ class PublicApiController extends Controller
|
|||
->get()
|
||||
->map(function($s) use ($user) {
|
||||
$status = StatusService::getFull($s->id, $user->profile_id);
|
||||
if(!$status) {
|
||||
return false;
|
||||
}
|
||||
$status['favourited'] = (bool) LikeService::liked($user->profile_id, $s->id);
|
||||
return $status;
|
||||
})
|
||||
|
@ -362,6 +365,9 @@ class PublicApiController extends Controller
|
|||
->get()
|
||||
->map(function($s) use ($user) {
|
||||
$status = StatusService::getFull($s->id, $user->profile_id);
|
||||
if(!$status) {
|
||||
return false;
|
||||
}
|
||||
$status['favourited'] = (bool) LikeService::liked($user->profile_id, $s->id);
|
||||
return $status;
|
||||
})
|
||||
|
@ -777,7 +783,6 @@ class PublicApiController extends Controller
|
|||
$visibility = ['public', 'unlisted'];
|
||||
}
|
||||
}
|
||||
|
||||
$dir = $min_id ? '>' : '<';
|
||||
$id = $min_id ?? $max_id;
|
||||
$res = Status::whereProfileId($profile['id'])
|
||||
|
|
Loading…
Reference in a new issue