Merge remote-tracking branch 'tootsuite/master' into merge-upstream

This commit is contained in:
David Yip
2017-12-12 02:54:13 -06:00
98 changed files with 1201 additions and 426 deletions

View File

@@ -287,6 +287,7 @@ class Account < ApplicationRecord
FROM accounts
WHERE #{query} @@ #{textsearch}
AND accounts.suspended = false
AND accounts.moved_to_account_id IS NULL
ORDER BY rank DESC
LIMIT ?
SQL
@@ -312,6 +313,7 @@ class Account < ApplicationRecord
WHERE accounts.id IN (SELECT * FROM first_degree)
AND #{query} @@ #{textsearch}
AND accounts.suspended = false
AND accounts.moved_to_account_id IS NULL
GROUP BY accounts.id
ORDER BY rank DESC
LIMIT ?
@@ -327,6 +329,7 @@ class Account < ApplicationRecord
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
AND accounts.moved_to_account_id IS NULL
GROUP BY accounts.id
ORDER BY rank DESC
LIMIT ?