Insert text representation of hashtags into object["hashtags"]
[akkoma] / lib / pleroma / web / activity_pub / mrf / simple_policy.ex
index 6cd91826db178ba72f9cc0859fe7eac5c7397eca..2fa7b3194d02235856ab7b1bfcd08aaede549b9d 100644 (file)
@@ -74,9 +74,11 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
 
     object =
       if MRF.subdomain_match?(media_nsfw, actor_host) do
-        tags = (child_object["tag"] || []) ++ ["nsfw"]
-        child_object = Map.put(child_object, "tag", tags)
-        child_object = Map.put(child_object, "sensitive", true)
+        child_object =
+          child_object
+          |> Map.put("hashtags", (child_object["hashtags"] || []) ++ ["nsfw"])
+          |> Map.put("sensitive", true)
+
         Map.put(object, "object", child_object)
       else
         object