mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 08:44:49 +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');
|
$sortBy = $request->input('sort', 'all');
|
||||||
|
|
||||||
if($sortBy == 'all' && !$request->has('cursor')) {
|
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')
|
return DB::table('statuses')
|
||||||
->where('in_reply_to_id', $id)
|
->where('in_reply_to_id', $id)
|
||||||
->orderBy('id')
|
->orderBy('id')
|
||||||
|
|
|
@ -93,5 +93,14 @@ class CommentPipeline implements ShouldQueue
|
||||||
NotificationService::set($notification->profile_id, $notification->id);
|
NotificationService::set($notification->profile_id, $notification->id);
|
||||||
StatusService::del($comment->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