mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 18:01:05 +00:00
Fix allow with approval option not working on username blocks (#35655)
This commit is contained in:
parent
c8ec649830
commit
d8397040d7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user