From f58f20abbb761f652dbc6b44d213ebe90e305899 Mon Sep 17 00:00:00 2001 From: href Date: Tue, 18 Dec 2018 15:32:41 +0100 Subject: [PATCH] Twitter ActivityView: fix crash when activity content is nil --- lib/pleroma/web/twitter_api/views/activity_view.ex | 8 +++++--- 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 index 91d086740..bc90a1cd4 100644 --- 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//, "\n") - |> HTML.strip_tags() + if content do + content + |> String.replace(~r//, "\n") + |> HTML.strip_tags() + end reply_parent = Activity.get_in_reply_to_activity(activity) -- 2.45.2