transmogrifier: fix peertube/plume actor handling
authorWilliam Pitcock <nenolod@dereferenced.org>
Sat, 1 Sep 2018 23:44:19 +0000 (23:44 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sat, 1 Sep 2018 23:44:19 +0000 (23:44 +0000)
lib/pleroma/web/activity_pub/transmogrifier.ex

index b75422fc64ca74b86c3568f6e8795af1083ebc48..4a3a8219577869efc2e839d884000a315fb24278 100644 (file)
@@ -33,9 +33,9 @@ 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" => actor}) do
+  def contain_origin(id, %{"actor" => actor} = params) do
     id_uri = URI.parse(id)
-    actor_uri = URI.parse(actor)
+    actor_uri = URI.parse(get_actor(params))
 
     if id_uri.host == actor_uri.host do
       :ok