mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Fix allow with approval option not working on username blocks (#35655)
This commit is contained in:
parent
c8ec649830
commit
d8397040d7
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue