about summary refs log tree commit diff
path: root/app/services/batched_remove_status_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/batched_remove_status_service.rb')
-rw-r--r--app/services/batched_remove_status_service.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/batched_remove_status_service.rb b/app/services/batched_remove_status_service.rb
index 5000062e4..2b649ee22 100644
--- a/app/services/batched_remove_status_service.rb
+++ b/app/services/batched_remove_status_service.rb
@@ -21,6 +21,7 @@ class BatchedRemoveStatusService < BaseService
 
     statuses_with_account_conversations.each do |status|
       status.send(:unlink_from_conversations)
+      unpush_from_direct_timelines(status)
     end
 
     # We do not batch all deletes into one to avoid having a long-running
@@ -90,4 +91,10 @@ class BatchedRemoveStatusService < BaseService
       redis.publish("timeline:hashtag:#{hashtag}:local", payload) if status.local?
     end
   end
+
+  def unpush_from_direct_timelines(status)
+    status.mentions.each do |mention|
+      FeedManager.instance.unpush_from_direct(mention.account, status) if mention.account.local?
+    end
+  end
 end