|
|
|
@ -3023,7 +3023,7 @@ class ApiV1Controller extends Controller
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($sortBy == 'all' && !$request->has('cursor')) {
|
|
|
|
|
$ids = Cache::remember('status:replies:all:' . $id, 86400, function() use($id) {
|
|
|
|
|
$ids = Cache::remember('status:replies:all:' . $id, 3600, function() use($id) {
|
|
|
|
|
return DB::table('statuses')
|
|
|
|
|
->where('in_reply_to_id', $id)
|
|
|
|
|
->orderBy('id')
|
|
|
|
@ -3058,8 +3058,15 @@ class ApiV1Controller extends Controller
|
|
|
|
|
$status['favourited'] = LikeService::liked($pid, $post->id);
|
|
|
|
|
return $status;
|
|
|
|
|
})
|
|
|
|
|
->map(function($post) {
|
|
|
|
|
if(isset($post['account']) && isset($post['account']['id'])) {
|
|
|
|
|
$account = AccountService::get($post['account']['id'], true);
|
|
|
|
|
$post['account'] = $account;
|
|
|
|
|
}
|
|
|
|
|
return $post;
|
|
|
|
|
})
|
|
|
|
|
->filter(function($post) {
|
|
|
|
|
return $post && isset($post['id']) && isset($post['account']);
|
|
|
|
|
return $post && isset($post['id']) && isset($post['account']) && isset($post['account']['id']);
|
|
|
|
|
})
|
|
|
|
|
->values();
|
|
|
|
|
|
|
|
|
|