From 90bbd946145ad5d622044fea396b7d5d4a14f575 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 25 Apr 2018 21:25:56 +0000 Subject: [PATCH] ActivityPub MRF SimplePolicy: fix media stripping --- lib/pleroma/web/activity_pub/mrf/simple_policy.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex index 4dfb0c867..ea1af0f4d 100644 --- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex @@ -15,7 +15,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do @media_removal Keyword.get(@mrf_policy, :media_removal) defp check_media_removal(actor_info, object) do if actor_info.host in @media_removal do - object = Map.delete(object, "attachments") + child_object = Map.delete(object["object"], "attachment") + object = Map.put(object, "object", child_object) end {:ok, object} -- 2.45.2