# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
alias Pleroma.Config
alias Pleroma.FollowingRelationship
- alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.MRF
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