logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: a3e33fa17767ccdc191cfa8a0b9cd602ce07871b
parent: 093d39b63416f597b336e1e2b7fb12af3591ef43
Author: lambda <pleromagit@rogerbraun.net>
Date:   Sun, 23 Dec 2018 13:17:25 +0000

Merge branch 'hotfix/activity-without-content' into 'develop'

Twitter ActivityView: fix crash with activity without content

See merge request pleroma/pleroma!572

Diffstat:

Mlib/pleroma/web/twitter_api/views/activity_view.ex8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex @@ -245,9 +245,11 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do |> Formatter.emojify(object["emoji"]) text = - content - |> String.replace(~r/<br\s?\/?>/, "\n") - |> HTML.strip_tags() + if content do + content + |> String.replace(~r/<br\s?\/?>/, "\n") + |> HTML.strip_tags() + end reply_parent = Activity.get_in_reply_to_activity(activity)