about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-11-24 00:36:35 +0100
committerGitHub <noreply@github.com>2019-11-24 00:36:35 +0100
commit2448568d341dcf288bf004826666ab9010601b47 (patch)
tree2df762b1b6d46f64f97991a70267d96a4509cdd1 /app/models
parent55f5e81a9dc4c6cede5d43e549061be2ea9be614 (diff)
parent271b2e68f33e8086eb4a1ee44694fcd2ecd7ab07 (diff)
Merge pull request #1247 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 648378f7b..1f06926fd 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -438,7 +438,7 @@ class Account < ApplicationRecord
             accounts.*,
             (count(f.id) + 1) * ts_rank_cd(#{textsearch}, #{query}, 32) AS rank
           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 = ?)
+          LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = ?)
           WHERE accounts.id IN (SELECT * FROM first_degree)
             AND #{query} @@ #{textsearch}
             AND accounts.suspended_at IS NULL
@@ -448,7 +448,7 @@ class Account < ApplicationRecord
           LIMIT ? OFFSET ?
         SQL
 
-        records = find_by_sql([sql, account.id, account.id, account.id, account.id, limit, offset])
+        records = find_by_sql([sql, account.id, account.id, account.id, limit, offset])
       else
         sql = <<-SQL.squish
           SELECT