Skip to content

Commit

Permalink
Do not distribute Delete when rejecting unapproved accounts (mastodon…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Gargron committed Mar 19, 2019
1 parent 85f8145 commit 31d2019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def approve

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

Expand Down
2 changes: 1 addition & 1 deletion app/services/suspend_account_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def purge_user!
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])
Expand Down

0 comments on commit 31d2019

Please sign in to comment.