diff options
author | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-05-31 01:17:25 +0000 |
---|---|---|
committer | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-05-31 01:17:25 +0000 |
commit | 165b5dc7f5711efd07adb73316e94d89b9e7e3a3 (patch) | |
tree | eafd267dd5b167961455e24bbdba89b025563177 /app/services/batched_remove_status_service.rb | |
parent | e7b3a4263e5a22a64b7fdc3a965fa38e1935157a (diff) | |
parent | c61c4565ab17f7e882b93f96e4d97ff1681a7bcf (diff) |
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app/services/batched_remove_status_service.rb')
-rw-r--r-- | app/services/batched_remove_status_service.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/services/batched_remove_status_service.rb b/app/services/batched_remove_status_service.rb index ace51a1fc..ebb4034aa 100644 --- a/app/services/batched_remove_status_service.rb +++ b/app/services/batched_remove_status_service.rb @@ -21,7 +21,10 @@ class BatchedRemoveStatusService < BaseService @activity_xml = {} # Ensure that rendered XML reflects destroyed state - statuses.each(&:destroy) + statuses.each do |status| + status.mark_for_mass_destruction! + status.destroy + end # Batch by source account statuses.group_by(&:account_id).each_value do |account_statuses| @@ -53,7 +56,7 @@ class BatchedRemoveStatusService < BaseService end def unpush_from_home_timelines(account, statuses) - recipients = account.followers.local.to_a + recipients = account.followers_for_local_distribution.to_a recipients << account if account.local? @@ -65,7 +68,7 @@ class BatchedRemoveStatusService < BaseService end def unpush_from_list_timelines(account, statuses) - account.lists.select(:id, :account_id).each do |list| + account.lists_for_local_distribution.select(:id, :account_id).each do |list| statuses.each do |status| FeedManager.instance.unpush_from_list(list, status) end |