Only distribute statuses to followers who signed in in the last 2 weeks, add rake task for clearing feeds of inactive users
This commit is contained in:
parent
7baca3fe4d
commit
4f1d863615
3 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue