Skip to content

Commit

Permalink
Fix N+1 on mentions in PushUpdateWorker (mastodon#19637)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Nov 1, 2022
1 parent 15bae3e commit 6804228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/workers/push_update_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6804228

Please sign in to comment.