diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-10-22 20:03:03 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-10-22 20:03:03 -0500 |
commit | f2bd0750a9a7781ffb4e979e440d59fec51c913e (patch) | |
tree | e6c22e920580dc72cf85c55f3347c464fba78174 /app/lib | |
parent | eb9e1d9473c7ab6af884bde9991f7eac0ba938bf (diff) |
Show boosts of followed authors in home
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/feed_manager.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 3a26ec483..386a5648a 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -475,6 +475,10 @@ class FeedManager should_filter end + def following?(account_id, target_account_id) + Follow.where(account_id: account_id, target_account_id: target_account_id).exists? + end + def relationship_exists?(account_id, target_account_id) Follow.where(account_id: account_id, target_account_id: target_account_id) .or(Follow.where(account_id: target_account_id, target_account_id: account_id)) @@ -562,7 +566,7 @@ class FeedManager if status.reblog? add_to_reblogs(account_id, status, stream) if timeline_type == :home - return false unless home_reblogs || (timeline_type == :home && status.reblog.local?) + return false unless home_reblogs || (timeline_type == :home && (status.reblog.local? || following?(account_id, status.reblog.account_id))) end if status.reblog? |