[Pleroma.Web.MastodonAPI.StatusView]: Return nil as fallback for missing views
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Wed, 29 Aug 2018 19:07:12 +0000 (21:07 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 25 Oct 2018 03:24:01 +0000 (05:24 +0200)
lib/pleroma/web/mastodon_api/views/status_view.ex

index ef46ba4fc7ac266fd024ae3ab28556026324d0aa..d50e82274243fefffd27b0d95f2be1317cacaaa3 100644 (file)
@@ -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"