aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-02-16 20:38:25 +0300
committerrinpatch <rinpatch@sdf.org>2019-02-16 20:38:25 +0300
commit96c725328b556833d59de23093fb4aeba9bb5684 (patch)
tree2c0f2018ca542b3863f67158f2175f5601c34252
parent1ce1b7b58dc0e009635c9dd6e2571df56c04f356 (diff)
downloadpleroma-96c725328b556833d59de23093fb4aeba9bb5684.tar.gz
Remove a limit on attachments in Mastodon API and document the changes in responses from vanilla mastodon
-rw-r--r--docs/Differences-in-MastodonAPI-Responses.md9
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex2
2 files changed, 10 insertions, 1 deletions
diff --git a/docs/Differences-in-MastodonAPI-Responses.md b/docs/Differences-in-MastodonAPI-Responses.md
new file mode 100644
index 000000000..cfa34593e
--- /dev/null
+++ b/docs/Differences-in-MastodonAPI-Responses.md
@@ -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
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 69f5f992c..a49b381c9 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -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: %{