From: William Pitcock Date: Fri, 17 May 2019 18:49:10 +0000 (+0000) Subject: mrf: simple policy: mark all posts instead of posts with media as sensitive if they... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=78588dbd80580fbef53819dd87ee8fcc26cb09e9;p=akkoma mrf: simple policy: mark all posts instead of posts with media as sensitive if they match media_nsfw --- diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex index 50426e920..9627c3400 100644 --- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex @@ -48,10 +48,9 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do %{host: actor_host} = _actor_info, %{ "type" => "Create", - "object" => %{"attachment" => child_attachment} = child_object + "object" => child_object } = object - ) - when length(child_attachment) > 0 do + ) do object = if Enum.member?(Pleroma.Config.get([:mrf_simple, :media_nsfw]), actor_host) do tags = (child_object["tag"] || []) ++ ["nsfw"]