about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
Diffstat (limited to 'app/services')
-rw-r--r--app/services/process_hashtags_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/process_hashtags_service.rb b/app/services/process_hashtags_service.rb
index 617a38159..eab033d50 100644
--- a/app/services/process_hashtags_service.rb
+++ b/app/services/process_hashtags_service.rb
@@ -2,7 +2,8 @@
 
 class ProcessHashtagsService < BaseService
   def call(status, tags = [])
-    tags = status.text.scan(Tag::HASHTAG_RE).map(&:first) if status.local?
+    text = [status.text, status.spoiler_text].reject(&:empty?).join(' ')
+    tags = text.scan(Tag::HASHTAG_RE).map(&:first) if status.local?
 
     tags.map { |str| str.mb_chars.downcase }.uniq(&:to_s).each do |tag|
       status.tags << Tag.where(name: tag).first_or_initialize(name: tag)