From ddc217147c8b4ef8c0c852369dc080b36aa66efe Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 7 Nov 2023 02:24:52 -0700 Subject: [PATCH] Update ApiV1Controller, fix mutes in home feed --- app/Http/Controllers/Api/ApiV1Controller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 9e8f7ef23..8397faa66 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -2155,6 +2155,12 @@ class ApiV1Controller extends Controller return $following->push($pid)->toArray(); }); + $muted = UserFilterService::mutes($pid); + + if($muted && count($muted)) { + $following = array_diff($following, $muted); + } + if($min || $max) { $dir = $min ? '>' : '<'; $id = $min ?? $max;