diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a1328b78..e54a800aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ - Update StatusController, disable post embeds from spam accounts ([c167af43](https://github.com/pixelfed/pixelfed/commit/c167af43)) - Update ProfileController, require login to view spam accounts, and disable profile embeds and atom feeds for spam accounts ([dd2f5bb9](https://github.com/pixelfed/pixelfed/commit/dd2f5bb9)) - Update Settings, allow users to disable atom feeds ([3662d3de](https://github.com/pixelfed/pixelfed/commit/3662d3de)) +- Update ApiV1Controller, filter muted/blocked accounts from tag timeline ([f42c1140](https://github.com/pixelfed/pixelfed/commit/f42c1140)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.6 (2023-05-03)](https://github.com/pixelfed/pixelfed/compare/v0.11.5...v0.11.6) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index d72878e7d..9ac03a675 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 = '>'; @@ -3155,6 +3157,9 @@ class ApiV1Controller extends Controller } return $i && isset($i['account']); }) + ->filter(function($i) use($filters) { + return !in_array($i['account']['id'], $filters); + }) ->values() ->toArray();