Fix attachement rendering
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Wed, 13 Jun 2018 22:26:37 +0000 (00:26 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 21 Aug 2018 16:24:10 +0000 (18:24 +0200)
lib/pleroma/web/mastodon_api/views/status_view.ex

index 9625da822d23a464a03cf13a8cb239b277eb61af..7226a407e468e1e5f6fe9068503f0843055e3a81 100644 (file)
@@ -152,9 +152,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
   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