activitypub: transmogrifier: do not clobber the addressing on relayed announcements
authorWilliam Pitcock <nenolod@dereferenced.org>
Thu, 17 Jan 2019 23:19:15 +0000 (23:19 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Thu, 17 Jan 2019 23:21:31 +0000 (23:21 +0000)
lib/pleroma/web/activity_pub/transmogrifier.ex

index 86d11c874206b222553cbf74d38a66a48f38cc38..fa3abe3d81013ad9194b34481a7ce9de2ab6a878 100644 (file)
@@ -451,7 +451,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
     with actor <- get_actor(data),
          %User{} = actor <- User.get_or_fetch_by_ap_id(actor),
          {:ok, object} <- get_obj_helper(object_id) || fetch_obj_helper(object_id),
-         {:ok, activity, _object} <- ActivityPub.announce(actor, object, id, false) do
+         public <- ActivityPub.is_public?(data),
+         {:ok, activity, _object} <- ActivityPub.announce(actor, object, id, false, public) do
       {:ok, activity}
     else
       _e -> :error