Browse Source

Filter out reblogs of blocked users from public timeline (the not real-time variant)

closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
1de2833f30
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/models/status.rb

+ 1
- 1
app/models/status.rb View File

@ -86,7 +86,7 @@ class Status < ApplicationRecord
end
def self.as_public_timeline(account)
where.not(account_id: account.blocking).with_includes.with_counters
joins('LEFT JOIN statuses AS reblogs ON reblogs.id = statuses.reblog_of_id').where('reblogs.account_id NOT IN (SELECT target_account_id FROM blocks WHERE account_id = ?) AND statuses.account_id NOT IN (SELECT target_account_id FROM blocks WHERE account_id = ?)', account.id, account.id).with_includes.with_counters
end
def self.favourites_map(status_ids, account_id)

Loading…
Cancel
Save