From f80dcca6d5382432f7b957c2b76f01dd091eb88e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 23 Mar 2023 16:16:14 -0700 Subject: [PATCH] feat: masto api add display name --- packages/backend/src/server/api/mastodon/endpoints/account.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index ae8f9a786..9f4070f2d 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -32,6 +32,7 @@ export function apiAccountMastodon(router: Router): void { const data = await client.verifyAccountCredentials(); let acct = data.data; acct.id = convertId(acct.id, IdType.MastodonId); + acct.display_name = acct.display_name || acct.username; acct.url = `${BASE_URL}/@${acct.url}`; acct.note = acct.note || ""; acct.avatar_static = acct.avatar;