diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-14 14:09:33 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:18 -0500 |
commit | 79535cb863d2f956bff2af8449f10da4aede4ede (patch) | |
tree | c609880ad160a4a8105f8076a1139d63884a83c1 /app/services/update_status_service.rb | |
parent | e3b316dd3e797a9c266fc1ec5e104845df1da9c6 (diff) |
[Feature] Add support for unlisted and out-of-body tags
Diffstat (limited to 'app/services/update_status_service.rb')
-rw-r--r-- | app/services/update_status_service.rb | 12 |
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? |