aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/common_api.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivant.business@gmail.com>2019-04-04 23:43:08 +0300
committerIvan Tashkinov <ivant.business@gmail.com>2019-04-04 23:43:08 +0300
commit45765918c377c6daf8ee8e5bfad4ea24f67766b6 (patch)
treea8ccea9436d7c533a481939a4724c62d8ffac4c0 /lib/pleroma/web/common_api/common_api.ex
parentf7cd9131d4aa0da3c4c0174acc56ce1bbdbd284c (diff)
parent9c9eec62c2fb67507708dd9e5d3f80a098881a6e (diff)
downloadpleroma-45765918c377c6daf8ee8e5bfad4ea24f67766b6.tar.gz
[#923] Merge remote-tracking branch 'remotes/upstream/develop' into twitter_oauth
# Conflicts: # mix.exs
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r--lib/pleroma/web/common_api/common_api.ex17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex
index 25b990677..745d1839b 100644
--- a/lib/pleroma/web/common_api/common_api.ex
+++ b/lib/pleroma/web/common_api/common_api.ex
@@ -172,13 +172,16 @@ defmodule Pleroma.Web.CommonAPI do
end)
) do
res =
- ActivityPub.create(%{
- to: to,
- actor: user,
- context: context,
- object: object,
- additional: %{"cc" => cc, "directMessage" => visibility == "direct"}
- })
+ ActivityPub.create(
+ %{
+ to: to,
+ actor: user,
+ context: context,
+ object: object,
+ additional: %{"cc" => cc, "directMessage" => visibility == "direct"}
+ },
+ Pleroma.Web.ControllerHelper.truthy_param?(data["preview"]) || false
+ )
res
end