diff options
author | Eugen <eugen@zeonfederated.com> | 2016-09-27 10:52:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-27 10:52:37 +0200 |
commit | 3f75f522856954690d92358107e78bafd0db0baa (patch) | |
tree | 9240679c9a51c6092dc7ada85bb752c0800caec0 /app/lib | |
parent | 7e14eefc819ce27f45406452a4f8e2039d0f0886 (diff) |
Fix subtle home feed filtering bug
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/feed_manager.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 86acd39d9..8e141eb41 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -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) |