aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-08-29 21:07:12 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-10-25 05:24:01 +0200
commit3b0e9287a5c36dea7b7a4a240a14295cb17420b4 (patch)
treed72ff2c6ca7baf776c3d7def619b954fb8cdf5f5 /lib
parenta8137159c2363ec842b14f72288b26cf677f6f6a (diff)
downloadpleroma-3b0e9287a5c36dea7b7a4a240a14295cb17420b4.tar.gz
[Pleroma.Web.MastodonAPI.StatusView]: Return nil as fallback for missing views
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index ef46ba4fc..d50e82274 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -158,6 +158,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
}
end
+ def render("status.json", %{activity: %{data: %{"object" => object}} = activity} = opts) do
+ nil
+ end
+
def render("attachment.json", %{attachment: attachment}) do
[attachment_url | _] = attachment["url"]
media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image"