Twitter ActivityView: fix crash when activity content is nil

stable
href 6 years ago
parent b6ae412fcd
commit f58f20abbb
No known key found for this signature in database
GPG Key ID: EE8296C1A152C325

@ -245,9 +245,11 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|> Formatter.emojify(object["emoji"]) |> Formatter.emojify(object["emoji"])
text = text =
if content do
content content
|> String.replace(~r/<br\s?\/?>/, "\n") |> String.replace(~r/<br\s?\/?>/, "\n")
|> HTML.strip_tags() |> HTML.strip_tags()
end
reply_parent = Activity.get_in_reply_to_activity(activity) reply_parent = Activity.get_in_reply_to_activity(activity)

Loading…
Cancel
Save