aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-01-17 19:21:54 +0000
committerkaniini <nenolod@gmail.com>2019-01-17 19:21:54 +0000
commitf73b5bd05f26d881bcae8f374b1472a420ff77ea (patch)
treee750df82d5d73d6b25a7426937a394798da342a9 /lib
parent9fa761620d7c975db712da2e0b9a93feab6fd3cf (diff)
parent849c83ed464e8cbf57c727da8e7b4f8e7daf8fef (diff)
downloadpleroma-f73b5bd05f26d881bcae8f374b1472a420ff77ea.tar.gz
Merge branch 'attachment-links' into 'develop'
Make attachment links configurable See merge request pleroma/pleroma!677
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/common_api/common_api.ex9
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex1
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex
index 2902905fd..504670439 100644
--- a/lib/pleroma/web/common_api/common_api.ex
+++ b/lib/pleroma/web/common_api/common_api.ex
@@ -103,7 +103,14 @@ defmodule Pleroma.Web.CommonAPI do
attachments,
tags,
get_content_type(data["content_type"]),
- Enum.member?([true, "true"], data["no_attachment_links"])
+ Enum.member?(
+ [true, "true"],
+ Map.get(
+ data,
+ "no_attachment_links",
+ Pleroma.Config.get([:instance, :no_attachment_links], false)
+ )
+ )
),
context <- make_context(inReplyTo),
cw <- data["spoiler_text"],
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index a8fe9d708..daad89185 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -341,7 +341,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
params =
params
|> Map.put("in_reply_to_status_id", params["in_reply_to_id"])
- |> Map.put("no_attachment_links", true)
idempotency_key =
case get_req_header(conn, "idempotency-key") do