Fix unnecessary account note addition for already-muted moved-to users (#35566)

This commit is contained in:
Matt Jankowski 2025-07-29 04:23:19 -04:00 committed by GitHub
parent bedbab74b9
commit ea976a5ffb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,8 +115,10 @@ class MoveWorker
def carry_mutes_over! def carry_mutes_over!
@source_account.muted_by_relationships.where(account: Account.local).find_each do |mute| @source_account.muted_by_relationships.where(account: Account.local).find_each do |mute|
MuteService.new.call(mute.account, @target_account, notifications: mute.hide_notifications) unless skip_mute_move?(mute) unless skip_mute_move?(mute)
add_account_note_if_needed!(mute.account, 'move_handler.carry_mutes_over_text') MuteService.new.call(mute.account, @target_account, notifications: mute.hide_notifications)
add_account_note_if_needed!(mute.account, 'move_handler.carry_mutes_over_text')
end
rescue => e rescue => e
@deferred_error = e @deferred_error = e
end end