Resolve merge conflicts and remove IO.inspects
[akkoma] / lib / pleroma / web / common_api / common_api.ex
index a599ffee558e678830cd782d733ce859bed474ac..bc8f80389526a221286c0a18327807e02b302992 100644 (file)
@@ -154,9 +154,11 @@ defmodule Pleroma.Web.CommonAPI do
              data,
              visibility
            ),
+         {poll, mentions, tags} <- make_poll_data(data, mentions, tags),
          {to, cc} <- to_for_user_and_mentions(user, mentions, in_reply_to, visibility),
          context <- make_context(in_reply_to),
          cw <- data["spoiler_text"] || "",
+         sensitive <- data["sensitive"] || Enum.member?(tags, {"#nsfw", "nsfw"}),
          full_payload <- String.trim(status <> cw),
          length when length in 1..limit <- String.length(full_payload),
          object <-
@@ -169,7 +171,9 @@ defmodule Pleroma.Web.CommonAPI do
              in_reply_to,
              tags,
              cw,
-             cc
+             cc,
+             sensitive,
+             poll
            ),
          object <-
            Map.put(