From f2bd0750a9a7781ffb4e979e440d59fec51c913e Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Thu, 22 Oct 2020 20:03:03 -0500 Subject: Show boosts of followed authors in home --- app/lib/feed_manager.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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? -- cgit