From: William Pitcock Date: Thu, 25 Oct 2018 04:27:33 +0000 (+0000) Subject: transmogrifier: do not try to contain origin of something which doesn't have one X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=5383887bd4b807edffad2c27338debdc6389a238;p=akkoma transmogrifier: do not try to contain origin of something which doesn't have one --- diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 65ac07845..cbc800ad6 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -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))