From 750c48980b83689cdce849f058f661078c6dd228 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 21 Jul 2020 14:48:26 -0500 Subject: [Filtering] Do not include replies when blocked by parent or boosts if silenced and not following --- app/lib/feed_manager.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/lib') diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 6c15e2616..92c125c0f 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -248,10 +248,12 @@ class FeedManager check_for_blocks = crutches[:active_mentions][status.id] || [] check_for_blocks.concat([status.account_id]) + check_for_blocks.concat([[status.in_reply_to_account_id]]) if status.reply? if status.reblog? check_for_blocks.concat([status.reblog.account_id]) check_for_blocks.concat(crutches[:active_mentions][status.reblog_of_id] || []) + check_for_blocks.concat([[status.reblog.in_reply_to_account_id]]) if status.reblog.reply? end return true if check_for_blocks.any? { |target_account_id| crutches[:blocking][target_account_id] || crutches[:muting][target_account_id] } @@ -263,6 +265,8 @@ class FeedManager return !!should_filter elsif status.reblog? # Filter out a reblog + return true if status.reblog.account.silenced? # if the author is silenced + should_filter = crutches[:hiding_reblogs][status.account_id] # if the reblogger's reblogs are suppressed should_filter ||= crutches[:blocked_by][status.reblog.account_id] # or if the author of the reblogged status is blocking me should_filter ||= crutches[:domain_blocking][status.reblog.account.domain] # or the author's domain is blocked -- cgit