diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/process_hashtags_service.rb | 3 | ||||
-rw-r--r-- | app/services/process_mentions_service.rb | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/app/services/process_hashtags_service.rb b/app/services/process_hashtags_service.rb index 8904e2cf8..617a38159 100644 --- a/app/services/process_hashtags_service.rb +++ b/app/services/process_hashtags_service.rb @@ -2,8 +2,7 @@ class ProcessHashtagsService < BaseService def call(status, tags = []) - text = [status.text, status.spoiler_text].reject(&:blank?).join(' ') - tags = text.scan(Tag::HASHTAG_RE).map(&:first) if status.local? + tags = status.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) diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb index fd45810fb..aa0a4d71b 100644 --- a/app/services/process_mentions_service.rb +++ b/app/services/process_mentions_service.rb @@ -10,9 +10,7 @@ class ProcessMentionsService < BaseService def call(status) return unless status.local? - text = [status.text, status.spoiler_text].reject(&:blank?).join(' ') - - text.scan(Account::MENTION_RE).each do |match| + status.text.scan(Account::MENTION_RE).each do |match| username, domain = match.first.split('@') mentioned_account = Account.find_remote(username, domain) |