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-06 14:38:28 +0100
committerThibaut Girka <thib@sitedethib.com>2019-11-06 14:38:28 +0100
commit0ae7d8427394d5f98fb2bd78eaae9bf848831186 (patch)
treee15a6321eedcbf9a2ae55ce24e7d8960f233b5ef /app/models/account.rb
parent00793a86bc52e4cb37318e42ea4ceb37a896c727 (diff)
parent42d9ca21de298e1d51b87723745f2b17e4169894 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `package.json`
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index db2eb8993..648378f7b 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -431,6 +431,8 @@ class Account < ApplicationRecord
             SELECT target_account_id
             FROM follows
             WHERE account_id = ?
+            UNION ALL
+            SELECT ?
           )
           SELECT
             accounts.*,
@@ -446,7 +448,7 @@ class Account < ApplicationRecord
           LIMIT ? OFFSET ?
         SQL
 
-        records = find_by_sql([sql, account.id, account.id, account.id, limit, offset])
+        records = find_by_sql([sql, account.id, account.id, account.id, account.id, limit, offset])
       else
         sql = <<-SQL.squish
           SELECT