diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-08-22 01:47:25 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-08-22 01:47:25 +0200 |
commit | d5bdd55b5d70b44bfd409f5f6942dea882e1c823 (patch) | |
tree | cea0e8f72063c0627e24ec6ab90d4d95e0ca34e4 /lib | |
parent | 5dde6e4a003dfd4fbd9b6e8102b74a376b0d4c36 (diff) | |
download | pleroma-d5bdd55b5d70b44bfd409f5f6942dea882e1c823.tar.gz |
[Pleroma.Web.TwitterAPI.UserView]: Do not fail if user.bio is nil
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/twitter_api/views/user_view.ex | 2 |
1 files changed, 1 insertions, 1 deletions
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("<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], |