From f42c114058732bae4f65a5bbef6c337f299f9164 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 20 May 2023 22:57:42 -0600 Subject: [PATCH] Update ApiV1Controller, filter muted/blocked accounts from tag timeline. --- app/Http/Controllers/Api/ApiV1Controller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index d72878e7d..d4e058300 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -3129,6 +3129,8 @@ class ApiV1Controller extends Controller } } + $filters = UserFilterService::filters($request->user()->profile_id); + if(!$min && !$max) { $id = 1; $dir = '>'; @@ -3146,6 +3148,9 @@ class ApiV1Controller extends Controller ->map(function ($i) use($pe) { return $pe ? StatusService::get($i) : StatusService::getMastodon($i); }) + ->filter(function($i) use($filters) { + return !in_array($i['account']['id'], $filters); + }) ->filter(function($i) use($onlyMedia) { if(!$i) { return false;