mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-11-17 01:46:20 +01:00
[Pleroma.Web.TwitterAPI.UserView]: Do not fail if user.bio is nil
This commit is contained in:
parent
5dde6e4a00
commit
d5bdd55b5d
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user