diff options
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 5c0f70ff8..72bad51a2 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -177,6 +177,7 @@ class Account < ApplicationRecord account_id IN (SELECT * FROM first_degree) AND target_account_id NOT IN (SELECT * FROM first_degree) AND target_account_id NOT IN (:excluded_account_ids) + AND accounts.suspended = false GROUP BY target_account_id, accounts.id ORDER BY count(account_id) DESC OFFSET :offset @@ -199,6 +200,7 @@ class Account < ApplicationRecord ts_rank_cd(#{textsearch}, #{query}, 32) AS rank FROM accounts WHERE #{query} @@ #{textsearch} + AND accounts.suspended = false ORDER BY rank DESC LIMIT ? SQL @@ -216,6 +218,7 @@ class Account < ApplicationRecord FROM accounts LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = ?) OR (accounts.id = f.target_account_id AND f.account_id = ?) WHERE #{query} @@ #{textsearch} + AND accounts.suspended = false GROUP BY accounts.id ORDER BY rank DESC LIMIT ? |