From 3f0d90f0198f58d3d25b1ab6fee232f3a37927d3 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 28 Nov 2024 18:40:53 +0100 Subject: [PATCH] Fix inactive users' timelines being backfilled on follow and unsuspend (#33094) --- app/lib/feed_manager.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 2419b1363f9..8a22dd05d64 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -110,6 +110,8 @@ class FeedManager # @param [Account] into_account # @return [void] def merge_into_home(from_account, into_account) + return unless into_account.user&.signed_in_recently? + timeline_key = key(:home, into_account.id) aggregate = into_account.user&.aggregates_reblogs? query = from_account.statuses.list_eligible_visibility.includes(:preloadable_poll, :media_attachments, reblog: :account).limit(FeedManager::MAX_ITEMS / 4) @@ -136,6 +138,8 @@ class FeedManager # @param [List] list # @return [void] def merge_into_list(from_account, list) + return unless list.account.user&.signed_in_recently? + timeline_key = key(:list, list.id) aggregate = list.account.user&.aggregates_reblogs? query = from_account.statuses.list_eligible_visibility.includes(:preloadable_poll, :media_attachments, reblog: :account).limit(FeedManager::MAX_ITEMS / 4)