about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/feed_manager.rb19
1 files changed, 3 insertions, 16 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 7069026e3..f0928a945 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -16,8 +16,6 @@ class FeedManager
       filter_from_home?(status, receiver)
     elsif timeline_type == :mentions
       filter_from_mentions?(status, receiver)
-    elsif timeline_type == :public
-      filter_from_public?(status, receiver)
     else
       false
     end
@@ -89,7 +87,9 @@ class FeedManager
   def filter_from_home?(status, receiver)
     should_filter = false
 
-    if status.reply? && !status.in_reply_to_account_id.nil?                   # Filter out if it's a reply
+    if status.reply? && status.in_reply_to_id.nil?
+      should_filter = true
+    elsif status.reply? && !status.in_reply_to_account_id.nil?                # Filter out if it's a reply
       should_filter   = !receiver.following?(status.in_reply_to_account)      # and I'm not following the person it's a reply to
       should_filter &&= !(receiver.id == status.in_reply_to_account_id)       # and it's not a reply to me
       should_filter &&= !(status.account_id == status.in_reply_to_account_id) # and it's not a self-reply
@@ -115,17 +115,4 @@ class FeedManager
 
     should_filter
   end
-
-  def filter_from_public?(status, receiver)
-    should_filter   = receiver.blocking?(status.account)
-    should_filter ||= receiver.blocking?(status.mentions.includes(:account).map(&:account))
-
-    if status.reply? && !status.in_reply_to_account_id.nil?
-      should_filter ||= receiver.blocking?(status.in_reply_to_account)
-    elsif status.reblog?
-      should_filter ||= receiver.blocking?(status.reblog.account)
-    end
-
-    should_filter
-  end
 end