transmogrifier: do not try to contain origin of something which doesn't have one
[akkoma] / lib / pleroma / web / activity_pub / transmogrifier.ex
index 65ac0784575c446aa67c4c15f552fc04fac1bfd3..cbc800ad65c94b52e6b65b4064f97bf5e7524bfb 100644 (file)
@@ -37,6 +37,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
   @doc """
   Checks that an imported AP object's actor matches the domain it came from.
   """
+  def contain_origin(id, %{"actor" => nil}), do: :error
+
   def contain_origin(id, %{"actor" => actor} = params) do
     id_uri = URI.parse(id)
     actor_uri = URI.parse(get_actor(params))