Updated SuspendAccountService to resolve outstanding reports on suspend
• Updated: - SuspendAccountService to resolve outstanding reports on suspend
This commit is contained in:
parent
b7d6d5f18c
commit
32ac987ef0
|
@ -51,6 +51,7 @@ class SuspendAccountService < BaseService
|
|||
purge_user!
|
||||
purge_profile!
|
||||
purge_content!
|
||||
resolve_reports!
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -99,6 +100,10 @@ class SuspendAccountService < BaseService
|
|||
@account.save!
|
||||
end
|
||||
|
||||
def resolve_reports!
|
||||
Report.where(target_account: @account).unresolved.update_all(action_taken: true) unless @options[:destroy]
|
||||
end
|
||||
|
||||
def destroy_all(association)
|
||||
association.in_batches.destroy_all
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue