Merge branch 'feature/mrf-always-nsfw' into 'develop'
[akkoma] / lib / pleroma / web / common_api / utils.ex
index bee2fd159a2beec8bdebea14dec19562f962ab1d..d93c0d46e5962ba93bc2796a738ac294dbbcd656 100644 (file)
@@ -223,7 +223,8 @@ defmodule Pleroma.Web.CommonAPI.Utils do
         in_reply_to,
         tags,
         cw \\ nil,
-        cc \\ []
+        cc \\ [],
+        sensitive \\ false
       ) do
     object = %{
       "type" => "Note",
@@ -231,6 +232,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
       "cc" => cc,
       "content" => content_html,
       "summary" => cw,
+      "sensitive" => !Enum.member?(["false", "False", "0", false], sensitive),
       "context" => context,
       "attachment" => attachments,
       "actor" => actor,