diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-11 00:28:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-11 00:28:10 +0200 |
commit | 72698bc3b49925a2b2955f32e5a562c1eecd729b (patch) | |
tree | 747cf619113cc7377a4e48eaf504892b45a2696f /app/services | |
parent | 65027657ec5595131bfd82fce1458c9e2cd1afc6 (diff) |
Fix regressions from #2683 (#2970)
* Fix regressions from #2683 Properly format spoiler text HTML, while keeping old logic for blankness intact Process hashtags and mentions in spoiler text Format spoiler text for Atom Change "show more" toggle into a button instead of anchor Fix style regression on dropdowns for detailed statuses * Fix lint issue * Convert spoiler text to plaintext in desktop notifications
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/process_hashtags_service.rb | 2 | ||||
-rw-r--r-- | app/services/process_mentions_service.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/services/process_hashtags_service.rb b/app/services/process_hashtags_service.rb index eab033d50..8904e2cf8 100644 --- a/app/services/process_hashtags_service.rb +++ b/app/services/process_hashtags_service.rb @@ -2,7 +2,7 @@ class ProcessHashtagsService < BaseService def call(status, tags = []) - text = [status.text, status.spoiler_text].reject(&:empty?).join(' ') + text = [status.text, status.spoiler_text].reject(&:blank?).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| diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb index aa0a4d71b..fd45810fb 100644 --- a/app/services/process_mentions_service.rb +++ b/app/services/process_mentions_service.rb @@ -10,7 +10,9 @@ class ProcessMentionsService < BaseService def call(status) return unless status.local? - status.text.scan(Account::MENTION_RE).each do |match| + text = [status.text, status.spoiler_text].reject(&:blank?).join(' ') + + text.scan(Account::MENTION_RE).each do |match| username, domain = match.first.split('@') mentioned_account = Account.find_remote(username, domain) |