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

Twitter ActivityView: fix crash with activity without content

See merge request pleroma/pleroma!572
This commit is contained in:
lambda 2018-12-23 13:17:25 +00:00
commit a3e33fa177
1 changed files with 5 additions and 3 deletions

View File

@ -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)