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=94933ce99f6bb982f96ab7c988f7c6a5c0ef33d6;hpb=b122b6ffa318af30586f9da0532135959804a6a0;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 94933ce99..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(%Object{data: 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