1
0
Fork 0
forked from mirrors/akkoma

Twitter ActivityView: fix crash when activity content is nil

This commit is contained in:
href 2018-12-18 15:32:41 +01:00
parent b6ae412fcd
commit f58f20abbb
No known key found for this signature in database
GPG key ID: EE8296C1A152C325

View file

@ -245,9 +245,11 @@ def render(
|> 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)