alias Pleroma.Web.MastodonAPI.StatusView
def render("index.json", %{notifications: notifications, for: user}) do
- render_many(notifications, NotificationView, "show.json", %{for: user})
+ safe_render_many(notifications, NotificationView, "show.json", %{for: user})
end
def render("show.json", %{
"mention" ->
response
|> Map.merge(%{
- status: StatusView.render("status.json", %{activity: activity, for: user})
+ status: StatusView.render("show.json", %{activity: activity, for: user})
})
"favourite" ->
response
|> Map.merge(%{
- status: StatusView.render("status.json", %{activity: parent_activity, for: user})
+ status: StatusView.render("show.json", %{activity: parent_activity, for: user})
})
"reblog" ->
response
|> Map.merge(%{
- status: StatusView.render("status.json", %{activity: parent_activity, for: user})
+ status: StatusView.render("show.json", %{activity: parent_activity, for: user})
})
"follow" ->