about summary refs log tree commit diff
path: root/app/services/update_status_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/update_status_service.rb')
-rw-r--r--app/services/update_status_service.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/services/update_status_service.rb b/app/services/update_status_service.rb
index 015010588..d0e61d153 100644
--- a/app/services/update_status_service.rb
+++ b/app/services/update_status_service.rb
@@ -89,13 +89,11 @@ class UpdateStatusService < BaseService
       featured_tag.decrement(@status.id)
     end
 
-    if @status.public_visibility?
-      return if @deleted_tag_names.blank?
+    return unless @status.distributable? && @deleted_tag_names.present?
 
-      @deleted_tag_names.each do |hashtag|
-        redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}", @delete_payload)
-        redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}:local", @delete_payload) if @status.local?
-      end
+    @deleted_tag_names.each do |hashtag|
+      redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}", @delete_payload)
+      redis.publish("timeline:hashtag:#{hashtag.mb_chars.downcase}:local", @delete_payload) if @status.local?
     end
   end
 
@@ -124,7 +122,7 @@ class UpdateStatusService < BaseService
 
       @status.tags << tag
       new_tag_ids << tag.id
-      TrendingTags.record_use!(tag, @account, now) if @status.public_visibility?
+      TrendingTags.record_use!(tag, @account, now) if @status.distributable?
     end
 
     return unless @status.local? && @status.distributable?