Update ApiV1Controller, filter muted/blocked accounts from tag timeline.

This commit is contained in:
Daniel Supernault 2023-05-20 22:57:42 -06:00
parent 2b6cf7f8de
commit f42c114058
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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;