feat: masto api add display name

This commit is contained in:
ThatOneCalculator 2023-03-23 16:16:14 -07:00
parent f560f2516e
commit f80dcca6d5
No known key found for this signature in database
GPG Key ID: 8703CACD01000000

View File

@ -32,6 +32,7 @@ export function apiAccountMastodon(router: Router): void {
const data = await client.verifyAccountCredentials(); const data = await client.verifyAccountCredentials();
let acct = data.data; let acct = data.data;
acct.id = convertId(acct.id, IdType.MastodonId); acct.id = convertId(acct.id, IdType.MastodonId);
acct.display_name = acct.display_name || acct.username;
acct.url = `${BASE_URL}/@${acct.url}`; acct.url = `${BASE_URL}/@${acct.url}`;
acct.note = acct.note || ""; acct.note = acct.note || "";
acct.avatar_static = acct.avatar; acct.avatar_static = acct.avatar;