Remove a limit on attachments in Mastodon API and document the changes in responses...
authorrinpatch <rinpatch@sdf.org>
Sat, 16 Feb 2019 17:38:25 +0000 (20:38 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 16 Feb 2019 17:38:25 +0000 (20:38 +0300)
docs/Differences-in-MastodonAPI-Responses.md [new file with mode: 0644]
lib/pleroma/web/mastodon_api/views/status_view.ex

diff --git a/docs/Differences-in-MastodonAPI-Responses.md b/docs/Differences-in-MastodonAPI-Responses.md
new file mode 100644 (file)
index 0000000..cfa3459
--- /dev/null
@@ -0,0 +1,9 @@
+# Differences in Mastodon API responses from vanilla Mastodon
+
+## Flake IDs
+
+Pleroma uses 128-bit ids as opposed to Mastodon's 64 bits. However just like Mastodon's ids they are sortable strings
+
+## Attachment cap
+
+Some apps operate under the assumption that no more than 4 attachments ccan be returned, however Pleroma can return any amount of attachments
index 69f5f992c9bf7b365f57436fe942971794cc8a40..a49b381c952ed4c8a5e99c91a9c72f00f8f9f0bc 100644 (file)
@@ -166,7 +166,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       sensitive: sensitive,
       spoiler_text: object["summary"] || "",
       visibility: get_visibility(object),
-      media_attachments: attachments |> Enum.take(4),
+      media_attachments: attachments,
       mentions: mentions,
       tags: build_tags(tags),
       application: %{