diff options
author | David Yip <yipdw@member.fsf.org> | 2018-06-02 16:08:31 -0500 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-06-02 16:08:31 -0500 |
commit | a641d1b5b8e9f20104ab16e5419e6dee4e5af37f (patch) | |
tree | 30eeb0f208b0ff314d71f2f90935fc3ab5fc282f /app/models/concerns | |
parent | 9ad5de8a3a5a14760f83f3d0f95eddca1fc4b106 (diff) | |
parent | 165b5dc7f5711efd07adb73316e94d89b9e7e3a3 (diff) |
Merge remote-tracking branch 'personal/merge/tootsuite/master' into gs-master
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/account_interactions.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb index a064248d9..d067415fd 100644 --- a/app/models/concerns/account_interactions.rb +++ b/app/models/concerns/account_interactions.rb @@ -187,4 +187,15 @@ module AccountInteractions def pinned?(status) status_pins.where(status: status).exists? end + + def followers_for_local_distribution + followers.local + .joins(:user) + .where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago) + end + + def lists_for_local_distribution + lists.joins(account: :user) + .where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago) + end end |