From 2c5c531c3528124d51dd58a94e7f0519825ae226 Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Tue, 20 Aug 2024 11:05:36 +0100 Subject: [PATCH] readd comment about domain mutes --- lib/pleroma/user.ex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 6b0d90147..2bc3e9ace 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -1631,6 +1631,11 @@ def blocks_domain?(%User{} = user, %User{ap_id: ap_id}) do def blocks_domain?(%User{} = user, url) when is_binary(url) do %{host: host} = URI.parse(url) Enum.member?(user.domain_blocks, host) + # TODO: functionality should probably be changed such that subdomains block as well, + # but as it stands, this just hecks up the relationships endpoint + # domain_blocks = Pleroma.Web.ActivityPub.MRF.subdomains_regex(user.domain_blocks) + # %{host: host} = URI.parse(target.ap_id) + # Pleroma.Web.ActivityPub.MRF.subdomain_match?(domain_blocks, host) end def blocks_domain?(_, _), do: false