Reverting home timeline changes

This commit is contained in:
Fosco Marotto
2021-01-21 18:05:24 -05:00
parent 0369a1b9fb
commit e9cf46b4bc
7 changed files with 26 additions and 36 deletions

View File

@@ -20,8 +20,6 @@ class HomeFeed < Feed
def from_database(limit, max_id, since_id, min_id)
Status.as_home_timeline(@account)
.paginate_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
.excluding_blocked_reblogs(@account)
.not_excluded_by_account(@account)
.reject { |status| FeedManager.instance.filter?(:home, status, @account.id) }
end
end

View File

@@ -101,9 +101,6 @@ class Status < ApplicationRecord
scope :tagged_with, ->(tag) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag }) }
scope :excluding_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced_at: nil }) }
scope :including_silenced_accounts, -> { left_outer_joins(:account).where.not(accounts: { silenced_at: nil }) }
scope :excluding_blocked_reblogs, ->(account) { left_outer_joins(:reblog).where.not(account_id: account.excluded_from_timeline_account_ids) }
scope :popular_accounts, -> { left_outer_joins(:account).where('accounts.is_verified=true OR accounts.is_pro=true AND accounts.locked=false') }
scope :not_excluded_by_account, ->(account) { where.not(account_id: account.excluded_from_timeline_account_ids) }
scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
@@ -293,7 +290,7 @@ class Status < ApplicationRecord
end
def as_home_timeline(account)
query = where('statuses.created_at > ?', 3.days.ago)
query = where('created_at > ?', 3.days.ago)
query.where(account: [account] + account.following).without_replies
end