diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-05-26 22:49:47 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-05-26 22:49:47 +0200 |
commit | 7c6fff34d059c90eafdb1beeb2597a9606453582 (patch) | |
tree | c1376f9a3a7533c2d43fc9e281c92d168e941846 /app/models/admin | |
parent | a33a0f69523298520704b98d4dc7fdd1accae642 (diff) | |
parent | 52f4e834f293c9fdbf5805639d022ac4e3856b75 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/admin')
-rw-r--r-- | app/models/admin/status_batch_action.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/admin/status_batch_action.rb b/app/models/admin/status_batch_action.rb index 631af183c..7bf6fa6da 100644 --- a/app/models/admin/status_batch_action.rb +++ b/app/models/admin/status_batch_action.rb @@ -103,7 +103,7 @@ class Admin::StatusBatchAction def handle_report! @report = Report.new(report_params) unless with_report? - @report.status_ids = (@report.status_ids + status_ids.map(&:to_i)).uniq + @report.status_ids = (@report.status_ids + allowed_status_ids).uniq @report.save! @report_id = @report.id @@ -135,4 +135,8 @@ class Admin::StatusBatchAction def report_params { account: current_account, target_account: target_account } end + + def allowed_status_ids + AccountStatusesFilter.new(@report.target_account, current_account).results.with_discarded.where(id: status_ids).pluck(:id) + end end |