Fix text being nullable in TwitterAPI
authorrinpatch <rinpatch@sdf.org>
Fri, 22 Mar 2019 21:10:50 +0000 (00:10 +0300)
committerrinpatch <rinpatch@sdf.org>
Fri, 22 Mar 2019 21:10:50 +0000 (00:10 +0300)
lib/pleroma/web/twitter_api/views/activity_view.ex

index fe7d499753aa43610eef34e1e0463d9591b6e287..aa1d41fa2dd125d3d42b67a9a362620c784157eb 100644 (file)
@@ -266,6 +266,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
         content
         |> String.replace(~r/<br\s?\/?>/, "\n")
         |> HTML.get_cached_stripped_html_for_object(activity, __MODULE__)
+      else
+        ""
       end
 
     reply_parent = Activity.get_in_reply_to_activity(activity)