From 953e00bc058abc58ebc2f1f7cfa6cd7679b87cba Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 18 Nov 2019 03:47:38 -0600 Subject: Ensure that community-visible posts are removed from the timeline when the author deletes them. --- app/services/batched_remove_status_service.rb | 2 +- app/services/remove_status_service.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app') 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? -- cgit