mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-27 08:43:17 +00:00
commit
94df59ed1f
3 changed files with 11 additions and 2 deletions
|
@ -2516,7 +2516,7 @@ class ApiV1Controller extends Controller
|
|||
$sortBy = $request->input('sort', 'all');
|
||||
|
||||
if($sortBy == 'all' && !$request->has('cursor')) {
|
||||
$ids = Cache::remember('status:replies:all:' . $id, 900, function() use($id) {
|
||||
$ids = Cache::remember('status:replies:all:' . $id, 86400, function() use($id) {
|
||||
return DB::table('statuses')
|
||||
->where('in_reply_to_id', $id)
|
||||
->orderBy('id')
|
||||
|
|
|
@ -691,7 +691,7 @@ class PublicApiController extends Controller
|
|||
|
||||
public function accountFollowing(Request $request, $id)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
abort_if(!$request->user(), 403);
|
||||
$account = AccountService::get($id);
|
||||
abort_if(!$account, 404);
|
||||
$pid = $request->user()->profile_id;
|
||||
|
|
|
@ -93,5 +93,14 @@ class CommentPipeline implements ShouldQueue
|
|||
NotificationService::set($notification->profile_id, $notification->id);
|
||||
StatusService::del($comment->id);
|
||||
});
|
||||
|
||||
if($exists = Cache::get('status:replies:all:' . $status->id)) {
|
||||
if($exists && $exists->count() == 3) {
|
||||
} else {
|
||||
Cache::forget('status:replies:all:' . $status->id);
|
||||
}
|
||||
} else {
|
||||
Cache::forget('status:replies:all:' . $status->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue