From: Haelwenn (lanodan) Monnier Date: Tue, 21 Aug 2018 23:47:25 +0000 (+0200) Subject: [Pleroma.Web.TwitterAPI.UserView]: Do not fail if user.bio is nil X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=d5bdd55b5d70b44bfd409f5f6942dea882e1c823;p=akkoma [Pleroma.Web.TwitterAPI.UserView]: Do not fail if user.bio is nil --- 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],