Browse Source

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

pull/4/head
ThibG 5 years ago
committed by Eugen Rochko
parent
commit
1217185cfa
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/controllers/admin/accounts_controller.rb
  2. +1
    -1
      app/services/suspend_account_service.rb

+ 1
- 1
app/controllers/admin/accounts_controller.rb View File

@ -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

+ 1
- 1
app/services/suspend_account_service.rb View File

@ -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])

Loading…
Cancel
Save