This commit is contained in:
Matt Jankowski 2025-09-03 20:05:43 +00:00 committed by GitHub
commit bd490129eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,12 +6,23 @@ class UnmuteService < BaseService
account.unmute!(target_account)
if account.following?(target_account)
process_merges(account, target_account) if account.following?(target_account)
end
private
def process_merges(account, target_account)
MergeWorker.perform_async(target_account.id, account.id, 'home')
MergeWorker.push_bulk(account.owned_lists.with_list_account(target_account).pluck(:id)) do |list_id|
MergeWorker.push_bulk(mergeable_list_ids(account, target_account)) do |list_id|
[target_account.id, list_id, 'list']
end
end
def mergeable_list_ids(account, target_account)
account
.owned_lists
.with_list_account(target_account)
.pluck(:id)
end
end