2
0

Add with_list_account scope to List model (#35539)

This commit is contained in:
Matt Jankowski
2025-07-28 04:26:29 -04:00
committed by GitHub
parent 018e5e303f
commit 7cd3738c19
6 changed files with 28 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ class FollowRequest < ApplicationRecord
if account.local?
ListAccount.where(follow_request: self).update_all(follow_request_id: nil, follow_id: follow.id)
MergeWorker.perform_async(target_account.id, account.id, 'home')
MergeWorker.push_bulk(List.where(account: account).joins(:list_accounts).where(list_accounts: { account_id: target_account.id }).pluck(:id)) do |list_id|
MergeWorker.push_bulk(account.owned_lists.with_list_account(target_account).pluck(:id)) do |list_id|
[target_account.id, list_id, 'list']
end
end