forked from AkkomaGang/akkoma
mrf: simple policy: mark all posts instead of posts with media as sensitive if they match media_nsfw
This commit is contained in:
parent
d2dacadb6b
commit
78588dbd80
1 changed files with 2 additions and 3 deletions
|
@ -48,10 +48,9 @@ defp check_media_nsfw(
|
||||||
%{host: actor_host} = _actor_info,
|
%{host: actor_host} = _actor_info,
|
||||||
%{
|
%{
|
||||||
"type" => "Create",
|
"type" => "Create",
|
||||||
"object" => %{"attachment" => child_attachment} = child_object
|
"object" => child_object
|
||||||
} = object
|
} = object
|
||||||
)
|
) do
|
||||||
when length(child_attachment) > 0 do
|
|
||||||
object =
|
object =
|
||||||
if Enum.member?(Pleroma.Config.get([:mrf_simple, :media_nsfw]), actor_host) do
|
if Enum.member?(Pleroma.Config.get([:mrf_simple, :media_nsfw]), actor_host) do
|
||||||
tags = (child_object["tag"] || []) ++ ["nsfw"]
|
tags = (child_object["tag"] || []) ++ ["nsfw"]
|
||||||
|
|
Loading…
Reference in a new issue