about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-01 16:03:51 +0100
committerGitHub <noreply@github.com>2022-11-01 16:03:51 +0100
commit6804228fdfab70b25eab300d0ce16d4321f947a8 (patch)
tree0b99c521049dabccb20959001e1a1578eea527bf /app/workers
parent15bae3e0e467a19582a25e0482cd26c1c82fd7f9 (diff)
Fix N+1 on mentions in PushUpdateWorker (#19637)
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/push_update_worker.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/push_update_worker.rb b/app/workers/push_update_worker.rb
index ae444cfde..9f44c32b3 100644
--- a/app/workers/push_update_worker.rb
+++ b/app/workers/push_update_worker.rb
@@ -6,7 +6,7 @@ class PushUpdateWorker
 
   def perform(account_id, status_id, timeline_id = nil, options = {})
     @account     = Account.find(account_id)
-    @status      = Status.find(status_id)
+    @status      = Status.includes(active_mentions: :account, reblog: { active_mentions: :account }).find(status_id)
     @timeline_id = timeline_id || "timeline:#{account.id}"
     @options     = options.symbolize_keys