X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fmrf%2Fsimple_policy.ex;h=bb3838d2c18f009efefee8c2f18d1f373fac0abb;hb=250e2020987b1fc65251ba9564e41b38ba060391;hp=8e0514dc830c20b8840ee7bdb7ccd84858b9977a;hpb=87b13c543039859007d9e2ba27c0236ab4092a9d;p=akkoma
diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex
index 8e0514dc8..bb3838d2c 100644
--- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex
+++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
@@ -8,7 +8,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
alias Pleroma.Config
alias Pleroma.FollowingRelationship
- alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.MRF
@@ -75,11 +74,9 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
object =
if MRF.subdomain_match?(media_nsfw, actor_host) do
- child_object =
- child_object
- |> Map.put("hashtags", Object.hashtags(child_object) ++ ["nsfw"])
- |> Map.put("sensitive", true)
-
+ tags = (child_object["tag"] || []) ++ ["nsfw"]
+ child_object = Map.put(child_object, "tag", tags)
+ child_object = Map.put(child_object, "sensitive", true)
Map.put(object, "object", child_object)
else
object