forked from cybrespace/mastodon
Do not distribute Delete when rejecting unapproved accounts (#10321)
This commit is contained in:
parent
d041b7a1e7
commit
1217185cfa
|
@ -53,7 +53,7 @@ module Admin
|
||||||
|
|
||||||
def reject
|
def reject
|
||||||
authorize @account.user, :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')
|
redirect_to admin_accounts_path(pending: '1')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ class SuspendAccountService < BaseService
|
||||||
end
|
end
|
||||||
|
|
||||||
def purge_content!
|
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|
|
@account.statuses.reorder(nil).find_in_batches do |statuses|
|
||||||
BatchedRemoveStatusService.new.call(statuses, skip_side_effects: @options[:destroy])
|
BatchedRemoveStatusService.new.call(statuses, skip_side_effects: @options[:destroy])
|
||||||
|
|
Loading…
Reference in New Issue