Don’t check for mentions in URLs

URLs can contain things that look like @handles. Users shouldn’t be notified in this case.
This commit is contained in:
Tibor Martini 2023-08-27 16:24:43 +02:00 committed by GitHub
parent 925c16adea
commit 4228d37c7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -25,6 +25,7 @@ class ProcessMentionsService < BaseService
private
def scan_text!
@status.text = @status.text.gsub(/http[^\s]+/,"")
@status.text = @status.text.gsub(Account::MENTION_RE) do |match|
username, domain = Regexp.last_match(1).split('@')