MastoAPI: no more than 4 attachments.
authoreal <eal@waifu.club>
Mon, 20 Nov 2017 20:49:20 +0000 (22:49 +0200)
committereal <eal@waifu.club>
Mon, 20 Nov 2017 20:49:20 +0000 (22:49 +0200)
lib/pleroma/web/mastodon_api/views/status_view.ex

index 38abdb35f4889ae7fbbf904fbed360201a61f37e..5585a560572e582f7bb67483a7e3dd1ba7add741 100644 (file)
@@ -96,7 +96,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       sensitive: sensitive,
       spoiler_text: object["summary"] || "",
       visibility: "public",
-      media_attachments: attachments,
+      media_attachments: attachments |> Enum.take(4),
       mentions: mentions,
       tags: [], # fix,
       application: %{