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:
commit
a3e33fa177
@ -245,9 +245,11 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||||||
|> Formatter.emojify(object["emoji"])
|
|> Formatter.emojify(object["emoji"])
|
||||||
|
|
||||||
text =
|
text =
|
||||||
content
|
if content do
|
||||||
|> String.replace(~r/<br\s?\/?>/, "\n")
|
content
|
||||||
|> HTML.strip_tags()
|
|> String.replace(~r/<br\s?\/?>/, "\n")
|
||||||
|
|> HTML.strip_tags()
|
||||||
|
end
|
||||||
|
|
||||||
reply_parent = Activity.get_in_reply_to_activity(activity)
|
reply_parent = Activity.get_in_reply_to_activity(activity)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user