diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-01-18 16:40:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 16:40:09 +0100 |
commit | 343e1fe8e9ce94ea4f86d3a3df71f22f5fb2319d (patch) | |
tree | 551b4b1abb37bb40431699d3837e3ac14da86651 /app/models/admin | |
parent | 4b92e59f4fea4486ee6e5af7421e7945d5f7f998 (diff) |
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
Diffstat (limited to 'app/models/admin')
-rw-r--r-- | app/models/admin/status_batch_action.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/admin/status_batch_action.rb b/app/models/admin/status_batch_action.rb index 39cd7d0eb..b8bdec722 100644 --- a/app/models/admin/status_batch_action.rb +++ b/app/models/admin/status_batch_action.rb @@ -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? |