forked from AkkomaGang/akkoma
DeleteValidator: Improve code readability
This commit is contained in:
parent
1ead5f49b8
commit
f20a1a27ef
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue