DeleteValidator: Improve code readability

This commit is contained in:
Lain Soykaf 2020-05-03 12:19:01 +02:00
parent 1ead5f49b8
commit f20a1a27ef

View file

@ -67,19 +67,17 @@ def do_not_federate?(cng) do
end
defp same_domain?(cng) do
actor_domain =
actor_uri =
cng
|> get_field(:actor)
|> URI.parse()
|> (& &1.host).()
object_domain =
object_uri =
cng
|> get_field(:object)
|> URI.parse()
|> (& &1.host).()
object_domain == actor_domain
object_uri.host == actor_uri.host
end
def validate_deletion_rights(cng) do