Skip to content
Snippets Groups Projects
Commit be70272a authored by Maxim Filippov's avatar Maxim Filippov :new_moon_with_face:
Browse files

Treat only true and "true" as true

parent 838c0242
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,7 @@ defmodule Pleroma.Web.CommonAPI do
attachments,
tags,
get_content_type(data["content_type"]),
data["no_attachment_links"]
Enum.member?([true, "true"], data["no_attachment_links"])
),
context <- make_context(inReplyTo),
cw <- data["spoiler_text"],
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment