diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-17 01:59:34 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-17 01:59:34 +0200 |
commit | a782e3b39d2e979f1b246a058fb45c75b9a10141 (patch) | |
tree | e4c0b8ed74959987e3d330b7e2fb3f4b6c9b0393 /app | |
parent | 53deeeca018c093392b2962ddb6343cffe6d97d2 (diff) |
Actually fix public timeline
Diffstat (limited to 'app')
-rw-r--r-- | app/models/status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index f2935fea9..8b7c9c823 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -86,7 +86,7 @@ class Status < ApplicationRecord end def self.as_public_timeline(account) - joins('LEFT OUTER 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 + joins('LEFT OUTER JOIN statuses AS reblogs ON statuses.reblog_of_id = reblogs.id').where('(reblogs.account_id IS NULL OR 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) |