Add confirmation screen when handling reports (#22375)
* Add confirmation screen on moderation actions * Add flash notice when a report has been processed * Refactor tests * Add tests
This commit is contained in:
parent
4b92e59f4f
commit
343e1fe8e9
9 changed files with 240 additions and 29 deletions
|
@ -6,7 +6,8 @@ class Admin::StatusBatchAction
|
|||
include Authorization
|
||||
|
||||
attr_accessor :current_account, :type,
|
||||
:status_ids, :report_id
|
||||
:status_ids, :report_id,
|
||||
:text
|
||||
|
||||
attr_reader :send_email_notification
|
||||
|
||||
|
@ -57,7 +58,8 @@ class Admin::StatusBatchAction
|
|||
action: :delete_statuses,
|
||||
account: current_account,
|
||||
report: report,
|
||||
status_ids: status_ids
|
||||
status_ids: status_ids,
|
||||
text: text
|
||||
)
|
||||
|
||||
statuses.each { |status| Tombstone.find_or_create_by(uri: status.uri, account: status.account, by_moderator: true) } unless target_account.local?
|
||||
|
@ -95,7 +97,8 @@ class Admin::StatusBatchAction
|
|||
action: :mark_statuses_as_sensitive,
|
||||
account: current_account,
|
||||
report: report,
|
||||
status_ids: status_ids
|
||||
status_ids: status_ids,
|
||||
text: text
|
||||
)
|
||||
|
||||
UserMailer.warning(target_account.user, @warning).deliver_later! if warnable?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue