Correctly display accounts without name.
authorlain <lain@soykaf.club>
Thu, 22 Feb 2018 18:22:10 +0000 (19:22 +0100)
committerlain <lain@soykaf.club>
Thu, 22 Feb 2018 18:22:10 +0000 (19:22 +0100)
lib/pleroma/web/mastodon_api/views/account_view.ex

index d2a4dd3669fa5fae8f24734fecb1b216136cf879..f378bb36eac264e96415bb84683715e138a84365 100644 (file)
@@ -18,7 +18,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
       id: to_string(user.id),
       username: hd(String.split(user.nickname, "@")),
       acct: user.nickname,
-      display_name: user.name,
+      display_name: user.name || user.nickname,
       locked: false,
       created_at: Utils.to_masto_date(user.inserted_at),
       followers_count: user_info.follower_count,