diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-03-12 11:51:25 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-03-12 11:51:25 +0100 |
commit | bb9a6fb5c239f4846e2e20c8435edb46f0c7c548 (patch) | |
tree | 2f6120abc31a698b1e1a7dbf442383a79d42ee77 /app/models/admin | |
parent | 2c8bb1745359a3bf200d37383dc56d5951e2b6bc (diff) | |
parent | d3aa9cf7744eede43c5c1b9097eb1f0720185ccd (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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/admin/status_batch_action.rb b/app/models/admin/status_batch_action.rb index 4d91b9805..631af183c 100644 --- a/app/models/admin/status_batch_action.rb +++ b/app/models/admin/status_batch_action.rb @@ -68,6 +68,8 @@ class Admin::StatusBatchAction end def handle_mark_as_sensitive! + representative_account = Account.representative + # Can't use a transaction here because UpdateStatusService queues # Sidekiq jobs statuses.includes(:media_attachments, :preview_cards).find_each do |status| @@ -76,7 +78,7 @@ class Admin::StatusBatchAction authorize(status, :update?) if target_account.local? - UpdateStatusService.new.call(status, current_account.id, sensitive: true) + UpdateStatusService.new.call(status, representative_account.id, sensitive: true) else status.update(sensitive: true) end |