aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/common_api.ex
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-05-24 21:05:57 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-05-24 21:05:57 +0700
commitf333041a0a2b9c2f1ef2236254b8dd3e9a55a688 (patch)
tree317be4a8b7c0b9a231853ee05547554f5da74c3f /lib/pleroma/web/common_api/common_api.ex
parent3b71612d3d8b5e2ad53bda4399eb7f687cd6c30e (diff)
parent6499adc6a83b4064f7283de3c729053e62ade7b2 (diff)
downloadpleroma-f333041a0a2b9c2f1ef2236254b8dd3e9a55a688.tar.gz
Merge remote-tracking branch 'pleroma/develop' into feature/addressable-lists
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r--lib/pleroma/web/common_api/common_api.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex
index a08075bc2..e8199200e 100644
--- a/lib/pleroma/web/common_api/common_api.ex
+++ b/lib/pleroma/web/common_api/common_api.ex
@@ -163,6 +163,7 @@ defmodule Pleroma.Web.CommonAPI do
bcc <- bcc_for_list(user, 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 <-
@@ -175,7 +176,8 @@ defmodule Pleroma.Web.CommonAPI do
in_reply_to,
tags,
cw,
- cc
+ cc,
+ sensitive
),
object <-
Map.put(