From d5bdd55b5d70b44bfd409f5f6942dea882e1c823 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Wed, 22 Aug 2018 01:47:25 +0200 Subject: [PATCH] [Pleroma.Web.TwitterAPI.UserView]: Do not fail if user.bio is nil --- lib/pleroma/web/twitter_api/views/user_view.ex | 2 +- 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 index 25fda1aa8..712557f77 100644 --- 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("
", "\n")), + "description" => HtmlSanitizeEx.strip_tags((user.bio || "") |> String.replace("
", "\n")), "description_html" => HtmlSanitizeEx.basic_html(user.bio), "favourites_count" => 0, "followers_count" => user_info[:follower_count], -- 2.45.2