[media] Force media attachments query from master on status post, change home query

This commit is contained in:
Fosco Marotto
2020-12-06 11:16:04 -08:00
parent d1eb3d09e4
commit 95d326936b
2 changed files with 3 additions and 2 deletions

View File

@@ -302,13 +302,13 @@ class Status < ApplicationRecord
end
def as_home_timeline(account)
query = where('updated_at > ?', 5.days.ago)
query = where('created_at > ?', 5.days.ago)
query.where(visibility: [:public, :unlisted, :private])
query.where(account: [account] + account.following).without_replies
end
def as_group_timeline(group)
query = where('updated_at > ?', 5.days.ago)
query = where('created_at > ?', 5.days.ago)
query.where(group: group).without_replies
end