about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-11-18 03:47:38 -0600
committermultiple creatures <dev@multiple-creature.party>2019-11-18 03:47:38 -0600
commit953e00bc058abc58ebc2f1f7cfa6cd7679b87cba (patch)
tree6fece2cb3bbf9625b4eb60b3074277957580f604 /app/services
parente90e1283f965d30286a6511fe10ccc2817e846eb (diff)
Ensure that community-visible posts are removed from the timeline when the author deletes them.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/batched_remove_status_service.rb2
-rw-r--r--app/services/remove_status_service.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/app/services/batched_remove_status_service.rb b/app/services/batched_remove_status_service.rb
index e8b361210..3110cb511 100644
--- a/app/services/batched_remove_status_service.rb
+++ b/app/services/batched_remove_status_service.rb
@@ -65,7 +65,7 @@ class BatchedRemoveStatusService < BaseService
   end
 
   def unpush_from_public_timelines(status)
-    return unless status.public_visibility?
+    return unless status.distributable?
 
     payload = @json_payloads[status.id]
 
diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb
index f9f20aae5..9d50e676b 100644
--- a/app/services/remove_status_service.rb
+++ b/app/services/remove_status_service.rb
@@ -135,7 +135,7 @@ class RemoveStatusService < BaseService
       featured_tag.decrement(@status.id)
     end
 
-    return unless @status.public_visibility?
+    return unless @status.distributable?
 
     @tags.each do |hashtag|
       redis.publish("timeline:hashtag:#{hashtag}", @payload)
@@ -144,14 +144,14 @@ class RemoveStatusService < BaseService
   end
 
   def remove_from_public
-    return unless @status.public_visibility?
+    return unless @status.distributable?
 
     redis.publish('timeline:public', @payload)
     redis.publish('timeline:public:local', @payload) if @status.local?
   end
 
   def remove_from_media
-    return unless @status.public_visibility?
+    return unless @status.distributable?
 
     redis.publish('timeline:public:media', @payload)
     redis.publish('timeline:public:local:media', @payload) if @status.local?