@ -18,7 +18,7 @@ class TagManager
end
def local_domain?(domain)
domain.nil? || domain.gsub(/[\/]/, '') == Rails.configuration.x.local_domain
domain.nil? || domain.gsub(/[\/]/, '').downcase == Rails.configuration.x.local_domain.downcase
def uri_for(target)
@ -125,7 +125,7 @@ class Account < ApplicationRecord
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!
def self.find_local(username)