Merge branch 'bugfix/ap-uri-user-search' into 'develop'
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index ef46ba4fc7ac266fd024ae3ab28556026324d0aa..8ffaf8466b88202db514b8576d6b10f795d8eaa7 100644 (file)
@@ -34,6 +34,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       "status.json",
       Map.put(opts, :replied_to_activities, replied_to_activities)
     )
+    |> Enum.filter(fn x -> not is_nil(x) end)
   end
 
   def render(
@@ -158,6 +159,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
     }
   end
 
+  def render("status.json", _) do
+    nil
+  end
+
   def render("attachment.json", %{attachment: attachment}) do
     [attachment_url | _] = attachment["url"]
     media_type = attachment_url["mediaType"] || attachment_url["mimeType"] || "image"