mrf: simple policy: mark all posts instead of posts with media as sensitive if they...
authorWilliam Pitcock <nenolod@dereferenced.org>
Fri, 17 May 2019 18:49:10 +0000 (18:49 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Fri, 17 May 2019 18:49:10 +0000 (18:49 +0000)
lib/pleroma/web/activity_pub/mrf/simple_policy.ex

index 50426e920be268a7d4d04b2572aa0a5948f93e64..9627c340032496db9da5e2b8dbb8cf96430d02ef 100644 (file)
@@ -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"]