]> cat aescling's git repositories - mastodon.git/commitdiff
FeedManager: skip account when target_account's last status is too old (#18009)
authordogelover911 <84288771+dogelover911@users.noreply.github.com>
Mon, 11 Apr 2022 19:17:03 +0000 (14:17 -0500)
committersingle-right-quote <11325618-aescling@users.noreply.gitlab.com>
Thu, 5 May 2022 03:55:58 +0000 (23:55 -0400)
Co-authored-by: dogelover911 <dogelover911@localhost>
app/lib/feed_manager.rb

index 02ecb403df3c46fa8528d259201bda9575921a56..b35ae4f2252ca5b80a88980ea7a2996b7f356e2c 100644 (file)
@@ -268,7 +268,7 @@ class FeedManager
     account.following.includes(:account_stat).find_each do |target_account|
       if redis.zcard(timeline_key) >= limit
         oldest_home_score = redis.zrange(timeline_key, 0, 0, with_scores: true).first.last.to_i
-        last_status_score = Mastodon::Snowflake.id_at(account.last_status_at)
+        last_status_score = Mastodon::Snowflake.id_at(target_account.last_status_at)
 
         # If the feed is full and this account has not posted more recently
         # than the last item on the feed, then we can skip the whole account