Browse Source

mrf: simple policy: mark all posts instead of posts with media as sensitive if they match media_nsfw

tags/v1.1.4
William Pitcock 5 years ago
parent
commit
78588dbd80
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      lib/pleroma/web/activity_pub/mrf/simple_policy.ex

+ 2
- 3
lib/pleroma/web/activity_pub/mrf/simple_policy.ex View 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"]


Loading…
Cancel
Save