From 79535cb863d2f956bff2af8449f10da4aede4ede Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Fri, 14 Aug 2020 14:09:33 -0500 Subject: [Feature] Add support for unlisted and out-of-body tags --- app/services/update_status_service.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'app/services/update_status_service.rb') 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? -- cgit