0
0
Fork 0

Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
- `app/serializers/rest/account_serializer.rb`:
  Upstream added code too close to glitch-soc-specific followers-hiding code.
  Ported upstream changes.
This commit is contained in:
Thibaut Girka 2020-01-27 15:46:50 +01:00
commit c56a504d11
38 changed files with 323 additions and 129 deletions

View file

@ -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