logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 3e30f6e19824dc90717fc0929feddb24220a89ab
parent: 3b8d64ee24053638aa22f67ced1367c8666b9fa0
Author: rinpatch <rinpatch@sdf.org>
Date:   Thu,  5 Sep 2019 05:47:06 +0000

Merge branch 'fix/safe-render-notifications' into 'develop'

Do not crash if one notification failed to render

See merge request pleroma/pleroma!1630

Diffstat:

MCHANGELOG.md1+
Mlib/pleroma/web/mastodon_api/views/notification_view.ex2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Federation/MediaProxy not working with instances that have wrong certificate order - Mastodon API: Handling of search timeouts (`/api/v1/search` and `/api/v2/search`) - Mastodon API: Embedded relationships not being properly rendered in the Account entity of Status entity +- Mastodon API: Notifications endpoint crashing if one notification failed to render - Mastodon API: follower/following counters not being nullified, when `hide_follows`/`hide_followers` is set - Mastodon API: `muted` in the Status entity, using author's account to determine if the tread was muted - Mastodon API: Add `account_id`, `type`, `offset`, and `limit` to search API (`/api/v1/search` and `/api/v2/search`) diff --git a/lib/pleroma/web/mastodon_api/views/notification_view.ex b/lib/pleroma/web/mastodon_api/views/notification_view.ex @@ -14,7 +14,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationView do 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", %{