]> cat aescling's git repositories - mastodon.git/commitdiff
Fix subtle home feed filtering bug
authorEugen <eugen@zeonfederated.com>
Tue, 27 Sep 2016 08:52:37 +0000 (10:52 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Sep 2016 08:52:37 +0000 (10:52 +0200)
app/lib/feed_manager.rb

index 86acd39d911871d0840b4aa92ab514c3c235489a..8e141eb414d1ad1466cf24f366af0fabb2da8145 100644 (file)
@@ -9,9 +9,10 @@ class FeedManager
     "feed:#{type}:#{id}"
   end
 
+  # Filter status out of the home feed if it is a reply to someone the user doesn't follow
   def filter_status?(status, follower)
     replied_to_user = status.reply? ? status.thread.account : nil
-    (status.reply? && !(follower.id = replied_to_user.id || follower.following?(replied_to_user)))
+    (status.reply? && !(follower.id == replied_to_user.id || replied_to_user.id == status.account_id || follower.following?(replied_to_user)))
   end
 
   def push(timeline_type, account, status)