diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 47de161d8..81b724935 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -142,7 +142,7 @@ class Account < ApplicationRecord end def find_remote!(username, domain) - where(arel_table[:username].matches(username)).where(domain.nil? ? { domain: nil } : arel_table[:domain].matches(domain)).take! + where(arel_table[:username].matches(username.gsub(/[%_]/, '\\\\\0'))).where(domain.nil? ? { domain: nil } : arel_table[:domain].matches(domain.gsub(/[%_]/, '\\\\\0'))).take! end def find_local(username) |