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

main
Claire 2 years ago committed by GitHub
parent 15bae3e0e4
commit 6804228fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save