Fix allow with approval option not working on username blocks (#35655)

This commit is contained in:
Eugen Rochko authored and GitHub committed 2025-08-04 13:10:19 +00:00
1 parent c8ec649830
commit d8397040d7
1 file changed
+1 -1
+1 -1
View File
@@ -43,7 +43,7 @@ class UsernameBlock < ApplicationRecord
def self.matches?(str, allow_with_approval: false)
normalized_str = str.downcase.gsub(Regexp.union(HOMOGLYPHS.keys), HOMOGLYPHS)
where(allow_with_approval: allow_with_approval).matches_exactly(normalized_str).or(matches_partially(normalized_str)).any?
matches_exactly(normalized_str).or(matches_partially(normalized_str)).where(allow_with_approval: allow_with_approval).any?
end
def to_log_human_identifier