%{shortcode: name, url: url, static_url: url, visible_in_picker: false}
end)
%{shortcode: name, url: url, static_url: url, visible_in_picker: false}
end)
in_reply_to_id: reply_to && to_string(reply_to.id),
in_reply_to_account_id: reply_to_user && to_string(reply_to_user.id),
reblog: nil,
in_reply_to_id: reply_to && to_string(reply_to.id),
in_reply_to_account_id: reply_to_user && to_string(reply_to_user.id),
reblog: nil,
def render("attachment.json", %{attachment: attachment}) do
[attachment_url | _] = attachment["url"]
def render("attachment.json", %{attachment: attachment}) do
[attachment_url | _] = attachment["url"]
- media_type = attachment_url["mediaType"] || attachment_url["mimeType"]
- href = attachment_url["href"]
+ media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image"
+ href = attachment_url["href"] |> MediaProxy.url()