Default to disabled in the code in case the setting is absent from config.exs
[akkoma] / lib / pleroma / web / common_api / common_api.ex
index 2902905fd399c3c939aba11e49eb1dfc71f9b998..782e7da8f69912ded9b12631f83bc088daa5e601 100644 (file)
@@ -103,7 +103,7 @@ 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"],