mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Twitter API: Fall back to user.nickname if user has no name
This commit is contained in:
parent
e7d6f133eb
commit
cb6fd73861
1 changed files with 6 additions and 2 deletions
|
@ -55,8 +55,12 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
"statusnet_blocking" => statusnet_blocking,
|
||||
"friends_count" => user_info[:following_count],
|
||||
"id" => user.id,
|
||||
"name" => user.name,
|
||||
"name_html" => HTML.strip_tags(user.name) |> Formatter.emojify(emoji),
|
||||
"name" => user.name || user.nickname,
|
||||
"name_html" =>
|
||||
if(user.name,
|
||||
do: HTML.strip_tags(user.name) |> Formatter.emojify(emoji),
|
||||
else: user.nickname
|
||||
),
|
||||
"profile_image_url" => image,
|
||||
"profile_image_url_https" => image,
|
||||
"profile_image_url_profile_size" => image,
|
||||
|
|
Loading…
Reference in a new issue