Rendering fallback for when we don't have valid data available

This commit is contained in:
Mark Felder 2021-02-09 18:51:59 -06:00
parent 981349f21d
commit 4540e08a6a
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ def render(
media_attachments: reblogged[:media_attachments] || [], media_attachments: reblogged[:media_attachments] || [],
mentions: mentions, mentions: mentions,
tags: reblogged[:tags] || [], tags: reblogged[:tags] || [],
application: activity_object.data["application"], application: activity_object.data["application"] || %{name: "Web", website: nil},
language: nil, language: nil,
emojis: [], emojis: [],
pleroma: %{ pleroma: %{
@ -345,7 +345,7 @@ def render("show.json", %{activity: %{data: %{"object" => _object}} = activity}
poll: render(PollView, "show.json", object: object, for: opts[:for]), poll: render(PollView, "show.json", object: object, for: opts[:for]),
mentions: mentions, mentions: mentions,
tags: build_tags(tags), tags: build_tags(tags),
application: object.data["application"], application: object.data["application"] || %{name: "Web", website: nil},
language: nil, language: nil,
emojis: build_emojis(object.data["emoji"]), emojis: build_emojis(object.data["emoji"]),
pleroma: %{ pleroma: %{