Skip to content
Snippets Groups Projects
Commit 90bbd946 authored by kaniini's avatar kaniini
Browse files

ActivityPub MRF SimplePolicy: fix media stripping

parent d4a54a90
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,8 @@ defp check_reject(actor_info, object) 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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment