Make account domains case-insensitive, downcase before checking against local
This commit is contained in:
parent
5f737c7228
commit
aec51e40ee
2 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def self.find_remote!(username, domain)
|
||||
where(arel_table[:username].matches(username)).where(domain: domain).take!
|
||||
where(arel_table[:username].matches(username)).where(domain.nil? ? { domain: nil } : arel_table[:domain].matches(domain)).take!
|
||||
end
|
||||
|
||||
def self.find_local(username)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue