diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-24 18:17:58 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-24 18:17:58 +0100 |
commit | 4f1d8636154d8f445eadec5ce3906f06324b0176 (patch) | |
tree | 7c044c73bc462af98ce2740848c41d8e4f54a40c /app/services | |
parent | 7baca3fe4d4b3279236f0004c867bcd2f5bc8849 (diff) |
Only distribute statuses to followers who signed in in the last 2 weeks, add rake task for clearing feeds of inactive users
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/fan_out_on_write_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index 78cb0b13f..78301c6ca 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -24,7 +24,7 @@ class FanOutOnWriteService < BaseService def deliver_to_followers(status) Rails.logger.debug "Delivering status #{status.id} to followers" - status.account.followers.where(domain: nil).find_each do |follower| + status.account.followers.where(domain: nil).joins(:user).where('users.current_sign_in_at > ?', 14.days.ago).find_each do |follower| next if FeedManager.instance.filter?(:home, status, follower) FeedManager.instance.push(:home, follower, status) end |