mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-08 17:34:19 +00:00
revert subdomain change until i can look at why i did that
This commit is contained in:
parent
4b765b1886
commit
c0b2bba55e
|
@ -1629,9 +1629,8 @@ defmodule Pleroma.User do
|
|||
end
|
||||
|
||||
def blocks_domain?(%User{} = user, url) when is_binary(url) do
|
||||
domain_blocks = Pleroma.Web.ActivityPub.MRF.subdomains_regex(user.domain_blocks)
|
||||
%{host: host} = URI.parse(url)
|
||||
Pleroma.Web.ActivityPub.MRF.subdomain_match?(domain_blocks, host)
|
||||
%{host: host} = URI.parse(target.ap_id)
|
||||
Enum.member?(user.domain_blocks, host)
|
||||
end
|
||||
|
||||
def blocks_domain?(_, _), do: false
|
||||
|
|
|
@ -1177,8 +1177,6 @@ defmodule Pleroma.UserTest do
|
|||
|
||||
url = URI.parse(blocked_user.ap_id)
|
||||
{:ok, user} = User.block_domain(user, url.host)
|
||||
assert User.blocks_domain?(user, blocked_user)
|
||||
|
||||
{:ok, user} = User.unblock_domain(user, url.host)
|
||||
|
||||
refute User.blocks_domain?(user, blocked_user)
|
||||
|
|
Loading…
Reference in a new issue