Revert HTML CW changes (#3020)
* selectively Revert "Fix regressions from #2683 (#2970)" This reverts commit72698bc3b4
. * Revert "Handle hashtags in spoiler_texts (partial fix for #699) (#2683)" This reverts commite2491680e6
.
This commit is contained in:
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user