diff options
author | rinpatch <rinpatch@sdf.org> | 2019-11-19 19:14:35 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-11-19 19:14:35 +0300 |
commit | b74f4260ae8367b33d133298a96fed9d1080ef5c (patch) | |
tree | 52846315b01ba52588d74c711f2d0f0bbff674b0 /lib | |
parent | 36f4382b3367a889a191b124066fbbafab37d047 (diff) | |
download | pleroma-b74f4260ae8367b33d133298a96fed9d1080ef5c.tar.gz pleroma-b74f4260ae8367b33d133298a96fed9d1080ef5c.zip |
Fix rendering conversations when there's a malformed status
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex index 863d673ea..a5de1fecd 100644 --- a/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex @@ -1671,9 +1671,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do participations = Participation.for_user_with_last_activity_id(user, params) conversations = - Enum.map(participations, fn participation -> - ConversationView.render("participation.json", %{participation: participation, for: user}) - end) + ConversationView.safe_render_many(participations, ConversationView, "participation.json", %{ + as: :participation, + for: user + }) conn |> add_link_headers(:conversations, participations) |