feat: masto api add display name

This commit is contained in:
ThatOneCalculator 2023-03-23 16:16:14 -07:00
parent 99ad96bc7a
commit 21061b6803

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;