From 8bc76713a9344fa13764f6ef5e7826585b016852 Mon Sep 17 00:00:00 2001 From: 2458773093 <2458773093@protonmail.com> Date: Sun, 4 Aug 2019 21:58:17 +0300 Subject: [PATCH] use feed manager to filter posts in group feeds --- app/controllers/api/v1/timelines/group_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/timelines/group_controller.rb b/app/controllers/api/v1/timelines/group_controller.rb index b19f3961..b66abe2c 100644 --- a/app/controllers/api/v1/timelines/group_controller.rb +++ b/app/controllers/api/v1/timelines/group_controller.rb @@ -38,7 +38,7 @@ class Api::V1::Timelines::GroupController < Api::BaseController statuses = group_timeline_statuses.without_replies.paginate_by_id( limit_param(DEFAULT_STATUSES_LIMIT), params_slice(:max_id, :since_id, :min_id) - ) + ).reject { |status| FeedManager.instance.filter?(:home, status, current_account.id) } if truthy_param?(:only_media) # `SELECT DISTINCT id, updated_at` is too slow, so pluck ids at first, and then select id, updated_at with ids.