Skip to content
Snippets Groups Projects
Commit 1217185c authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

Do not distribute Delete when rejecting unapproved accounts (#10321)

parent d041b7a1
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ module Admin
def reject
authorize @account.user, :reject?
SuspendAccountService.new.call(@account, including_user: true, destroy: true)
SuspendAccountService.new.call(@account, including_user: true, destroy: true, skip_distribution: true)
redirect_to admin_accounts_path(pending: '1')
end
......
......@@ -68,7 +68,7 @@ class SuspendAccountService < BaseService
end
def purge_content!
distribute_delete_actor! if @account.local?
distribute_delete_actor! if @account.local? && !@options[:skip_distribution]
@account.statuses.reorder(nil).find_in_batches do |statuses|
BatchedRemoveStatusService.new.call(statuses, skip_side_effects: @options[:destroy])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment