about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-11-23 19:03:01 +0100
committerThibaut Girka <thib@sitedethib.com>2019-11-23 19:03:01 +0100
commitc0f7e21685bbb6b40fdb6f042b8a7ec1054178f2 (patch)
treeac404a0b3326b9187967128058fc52d5bbacb3c3 /app/models/account.rb
parent55f5e81a9dc4c6cede5d43e549061be2ea9be614 (diff)
parent054ef83fc5808596643dd366286b4e85446b850c (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/account.rb')
-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