about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-02-03 17:02:48 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-02-03 17:02:48 +0100
commit4d40685850ea211ecc0d0d0735b5a4c084333858 (patch)
treeaf497c9118243be3b7208cee60afca6de9b5b68a /app/models/status.rb
parent7632255115a7f6e6f9f8047f0d0d1b90d7ee9315 (diff)
parent4e933924bdea3392ebeaeaa7c341593eb200512c (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 836d363ef..7bedbef07 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -120,7 +120,7 @@ class Status < ApplicationRecord
                    :tags,
                    :preview_cards,
                    :preloadable_poll,
-                   account: :account_stat,
+                   account: [:account_stat, :user],
                    active_mentions: { account: :account_stat },
                    reblog: [
                      :application,
@@ -130,7 +130,7 @@ class Status < ApplicationRecord
                      :conversation,
                      :status_stat,
                      :preloadable_poll,
-                     account: :account_stat,
+                     account: [:account_stat, :user],
                      active_mentions: { account: :account_stat },
                    ],
                    thread: { account: :account_stat }
@@ -354,7 +354,7 @@ class Status < ApplicationRecord
 
       return if account_ids.empty?
 
-      accounts = Account.where(id: account_ids).includes(:account_stat).index_by(&:id)
+      accounts = Account.where(id: account_ids).includes(:account_stat, :user).index_by(&:id)
 
       cached_items.each do |item|
         item.account = accounts[item.account_id]