diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-12-23 13:17:25 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-12-23 13:17:25 +0000 |
commit | a3e33fa17767ccdc191cfa8a0b9cd602ce07871b (patch) | |
tree | 7bb54fccf84d0bb9dcff4882686a969619746bae | |
parent | 093d39b63416f597b336e1e2b7fb12af3591ef43 (diff) | |
parent | f58f20abbb761f652dbc6b44d213ebe90e305899 (diff) | |
download | pleroma-a3e33fa17767ccdc191cfa8a0b9cd602ce07871b.tar.gz |
Merge branch 'hotfix/activity-without-content' into 'develop'
Twitter ActivityView: fix crash with activity without content
See merge request pleroma/pleroma!572
-rw-r--r-- | lib/pleroma/web/twitter_api/views/activity_view.ex | 8 |
1 files 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/<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) |