gearheads
/
mastodon
Archived
2
0
Fork 0

Fix N+1 on mentions in PushUpdateWorker (#19637)

gh/stable
Claire 2022-11-01 16:03:51 +01:00 committed by GitHub
parent 15bae3e0e4
commit 6804228fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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