diff options
author | rinpatch <rinpatch@sdf.org> | 2019-05-18 07:13:18 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-05-18 07:13:18 +0000 |
commit | 8e9a764dfcde315afd055c8e63543bfca24cc41b (patch) | |
tree | 5ff567a79c9d20c78c0cdcbfd3ab3f644bf765bc /lib/pleroma/web/activity_pub | |
parent | cd7a6a25d28308fba18254be357be0f6b4d888f2 (diff) | |
parent | c4a55e167afcfd25cf4c1efb46886f2defe72c22 (diff) | |
download | pleroma-8e9a764dfcde315afd055c8e63543bfca24cc41b.tar.gz |
Merge branch 'feature/mrf-always-nsfw' into 'develop'
suppress link previews from posts marked sensitive
Closes #865
See merge request pleroma/pleroma!1173
Diffstat (limited to 'lib/pleroma/web/activity_pub')
-rw-r--r-- | lib/pleroma/web/activity_pub/mrf/simple_policy.ex | 5 |
1 files changed, 2 insertions, 3 deletions
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"] |