Fix sending spurious Rejects when processing remote account deletion (#15104)

* Fix sending spurious Rejects when processing remote account deletion

* Make skip_side_effects imply skip_activitypub
This commit is contained in:
ThibG 2020-11-19 17:39:47 +01:00 committed by GitHub
parent df1653174b
commit 2f6831f318
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View file

@ -7,7 +7,8 @@ class AccountDeletionWorker
def perform(account_id, options = {})
reserve_username = options.with_indifferent_access.fetch(:reserve_username, true)
DeleteAccountService.new.call(Account.find(account_id), reserve_username: reserve_username, reserve_email: false)
skip_activitypub = options.with_indifferent_access.fetch(:skip_activitypub, false)
DeleteAccountService.new.call(Account.find(account_id), reserve_username: reserve_username, skip_activitypub: skip_activitypub, reserve_email: false)
rescue ActiveRecord::RecordNotFound
true
end