From 09eb7fb78dd20d0afd78e8623ecac2346e7eadb8 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 15 Jul 2019 14:05:37 -0500 Subject: [PATCH] don't put boosts of silenced folks into home feed if you don't follow them --- app/lib/feed_manager.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index a58b9bf7a..9996291c2 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -175,6 +175,7 @@ class FeedManager return should_filter elsif status.reblog? # Filter out a reblog should_filter = Follow.where(account_id: receiver_id, target_account_id: status.account_id, show_reblogs: false).exists? # if the reblogger's reblogs are suppressed + should_filter ||= (status.reblog.account.silenced? && !Follow.where(account_id: receiver_id, target_account_id: status.reblog.account_id).exists?) # or if the account is silenced and I'm not following them should_filter ||= Block.where(account_id: status.reblog.account_id, target_account_id: receiver_id).exists? # or if the author of the reblogged status is blocking me should_filter ||= AccountDomainBlock.where(account_id: receiver_id, domain: status.reblog.account.domain).exists? # or the author's domain is blocked return should_filter @@ -194,7 +195,7 @@ class FeedManager check_for_blocks.concat([status.in_reply_to_account]) if status.reply? && !status.in_reply_to_account_id.nil? should_filter = blocks_or_mutes?(receiver_id, check_for_blocks, :mentions) # Filter if it's from someone I blocked, in reply to someone I blocked, or mentioning someone I blocked (or muted) - should_filter ||= (status.account.silenced? && !Follow.where(account_id: receiver_id, target_account_id: status.account_id).exists?) # of if the account is silenced and I'm not following them + should_filter ||= (status.account.silenced? && !Follow.where(account_id: receiver_id, target_account_id: status.account_id).exists?) # or if the account is silenced and I'm not following them should_filter end