mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 12:11:40 +01:00
Fix reports of already suspended accounts being recorded (#16047)
This commit is contained in:
parent
baed52c2a7
commit
dde8739020
2 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,8 @@ class ActivityPub::Activity::Flag < ActivityPub::Activity
|
|||
target_accounts.each do |target_account|
|
||||
target_statuses = target_statuses_by_account[target_account.id]
|
||||
|
||||
next if target_account.suspended?
|
||||
|
||||
ReportService.new.call(
|
||||
@account,
|
||||
target_account,
|
||||
|
|
|
@ -10,6 +10,8 @@ class ReportService < BaseService
|
|||
@comment = options.delete(:comment) || ''
|
||||
@options = options
|
||||
|
||||
raise ActiveRecord::RecordNotFound if @target_account.suspended?
|
||||
|
||||
create_report!
|
||||
notify_staff!
|
||||
forward_to_origin! if !@target_account.local? && ActiveModel::Type::Boolean.new.cast(@options[:forward])
|
||||
|
|
Loading…
Reference in a new issue