Twitter ActivityView: fix crash when activity content is nil
This commit is contained in:
parent
b6ae412fcd
commit
f58f20abbb
1 changed files with 5 additions and 3 deletions
|
@ -245,9 +245,11 @@ def render(
|
||||||
|> 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 a new issue