1
0
Fork 0
forked from gitea/nas

Normalize idna domain before account unblock domain (#29530)

This commit is contained in:
Jeong Arm 2024-03-11 18:28:08 +09:00 committed by Claire
parent 7af69f5cf5
commit ab3f9852f2
2 changed files with 45 additions and 1 deletions

View file

@ -185,7 +185,7 @@ module AccountInteractions
end
def unblock_domain!(other_domain)
block = domain_blocks.find_by(domain: other_domain)
block = domain_blocks.find_by(domain: normalized_domain(other_domain))
block&.destroy
end
@ -313,4 +313,8 @@ module AccountInteractions
def remove_potential_friendship(other_account)
PotentialFriendshipTracker.remove(id, other_account.id)
end
def normalized_domain(domain)
TagManager.instance.normalize_domain(domain)
end
end