Fix attachement rendering

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-06-14 00:26:37 +02:00
parent a6b021a52b
commit 3b8ef24532
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
1 changed files with 3 additions and 3 deletions

View File

@ -152,9 +152,9 @@ def render("status.json", %{activity: %{data: %{"object" => object}} = activity}
end
def render("attachment.json", %{attachment: attachment}) do
[attachment | _] = attachment["url"]
media_type = attachment["mediaType"] || attachment["mimeType"]
href = attachment["href"]
[attachment_url | _] = attachment["url"]
media_type = attachment_url["mediaType"] || attachment_url["mimeType"]
href = attachment_url["href"]
type =
cond do