commit: d5bdd55b5d70b44bfd409f5f6942dea882e1c823
parent: 5dde6e4a003dfd4fbd9b6e8102b74a376b0d4c36
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 22 Aug 2018 01:47:25 +0200
[Pleroma.Web.TwitterAPI.UserView]: Do not fail if user.bio is nil
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex
@@ -38,7 +38,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
data = %{
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
- "description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
+ "description" => HtmlSanitizeEx.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
"description_html" => HtmlSanitizeEx.basic_html(user.bio),
"favourites_count" => 0,
"followers_count" => user_info[:follower_count],