diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 79c5a08fd..369a8996f 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -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') diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 5c1921bea..a15c517df 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -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; diff --git a/app/Jobs/CommentPipeline/CommentPipeline.php b/app/Jobs/CommentPipeline/CommentPipeline.php index 3afd825cc..e0ae491da 100644 --- a/app/Jobs/CommentPipeline/CommentPipeline.php +++ b/app/Jobs/CommentPipeline/CommentPipeline.php @@ -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); + } } }