0
0
Fork 0

Case-insensitive search by usernames

This commit is contained in:
Eugen Rochko 2016-09-04 21:06:04 +02:00
parent a82f2e4b82
commit 54ea7f5dfe
4 changed files with 14 additions and 4 deletions

View file

@ -8,7 +8,7 @@ class ProcessMentionsService < BaseService
status.text.scan(Account::MENTION_RE).each do |match|
username, domain = match.first.split('@')
mentioned_account = Account.find_by(username: username, domain: domain)
mentioned_account = Account.find_remote(username, domain)
if mentioned_account.nil? && !domain.nil?
mentioned_account = follow_remote_account_service.("#{match.first}")