Treat any present value in "no_attachment_links" as true
authorMaxim Filippov <colixer@gmail.com>
Wed, 26 Dec 2018 23:39:41 +0000 (02:39 +0300)
committerMaxim Filippov <colixer@gmail.com>
Wed, 26 Dec 2018 23:39:41 +0000 (02:39 +0300)
lib/pleroma/web/common_api/utils.ex

index b91cfc4bb89e97b6fd7a2e21872079ca1427722e..d9cc52e26f06ddf2e8ac934fd23244e5afec8b38 100644 (file)
@@ -89,7 +89,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
       ) do
     status
     |> format_input(mentions, tags, content_type)
-    |> maybe_add_attachments(attachments, no_attachment_links)
+    |> maybe_add_attachments(attachments, !!no_attachment_links)
   end
 
   def make_context(%Activity{data: %{"context" => context}}), do: context