diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-18 17:46:09 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-18 17:46:09 +0300 |
commit | 61d9f43e463a3b3b0c1e4b9c98c22e222797bd82 (patch) | |
tree | d0db351126377c4a648155df4dfdfd4358874b9c /lib/pleroma/web/common_api/utils.ex | |
parent | 269d592181bff8601f6545b85158ee1c222ff20d (diff) | |
parent | 3fa2ac68df10f6ffe3c1ea76fa10c30da90f4bd0 (diff) | |
download | pleroma-61d9f43e463a3b3b0c1e4b9c98c22e222797bd82.tar.gz |
Merge remote-tracking branch 'remotes/origin/develop' into 1505-threads-federation
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index ca6c93862..4445894b0 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -228,9 +228,9 @@ defmodule Pleroma.Web.CommonAPI.Utils do data, visibility ) do - no_attachment_links = + attachment_links = data - |> Map.get("no_attachment_links", Config.get([:instance, :no_attachment_links])) + |> Map.get("attachment_links", Config.get([:instance, :attachment_links])) |> truthy_param?() content_type = get_content_type(data["content_type"]) @@ -244,7 +244,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do status |> format_input(content_type, options) - |> maybe_add_attachments(attachments, no_attachment_links) + |> maybe_add_attachments(attachments, attachment_links) |> maybe_add_nsfw_tag(data) end @@ -270,7 +270,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do def make_context(%Activity{data: %{"context" => context}}, _), do: context def make_context(_, _), do: Utils.generate_context_id() - def maybe_add_attachments(parsed, _attachments, true = _no_links), do: parsed + def maybe_add_attachments(parsed, _attachments, false = _no_links), do: parsed def maybe_add_attachments({text, mentions, tags}, attachments, _no_links) do text = add_attachments(text, attachments) |