diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/feed_manager.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 3f167f0d8..13b7aafdf 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -11,6 +11,10 @@ class FeedManager # Must be <= MAX_ITEMS or the tracking sets will grow forever REBLOG_FALLOFF = 40 + def with_active_accounts(&block) + Account.joins(:user).where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago).find_each(&block) + end + def key(type, id, subtype = nil) return "feed:#{type}:#{id}" unless subtype |