DeleteValidator: Improve code readability
This commit is contained in:
parent
1ead5f49b8
commit
f20a1a27ef
@ -67,19 +67,17 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.DeleteValidator 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
|
||||
|
Loading…
Reference in New Issue
Block a user