From f80dcca6d5382432f7b957c2b76f01dd091eb88e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 23 Mar 2023 16:16:14 -0700 Subject: [PATCH 1/2] 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; From 765d90b789ca8fe4c203dc666c463ad2e7e9a110 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 23 Mar 2023 16:20:21 -0700 Subject: [PATCH 2/2] chore: :package: upgrade megalodon --- packages/backend/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index e7bec1a22..a34e24fda 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -81,7 +81,7 @@ "koa-send": "5.0.1", "koa-slow": "2.1.0", "koa-views": "7.0.2", - "@calckey/megalodon": "5.1.21", + "@calckey/megalodon": "5.1.22", "mfm-js": "0.23.2", "mime-types": "2.1.35", "multer": "1.4.4-lts.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37bc6c805..6833c6459 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,7 +55,7 @@ importers: '@bull-board/api': ^4.6.4 '@bull-board/koa': ^4.6.4 '@bull-board/ui': ^4.6.4 - '@calckey/megalodon': 5.1.21 + '@calckey/megalodon': 5.1.22 '@discordapp/twemoji': 14.0.2 '@elastic/elasticsearch': 7.17.0 '@koa/cors': 3.4.3 @@ -225,7 +225,7 @@ importers: '@bull-board/api': 4.10.2 '@bull-board/koa': 4.10.2_6tybghmia4wsnt33xeid7y4rby '@bull-board/ui': 4.10.2 - '@calckey/megalodon': 5.1.21 + '@calckey/megalodon': 5.1.22 '@discordapp/twemoji': 14.0.2 '@elastic/elasticsearch': 7.17.0 '@koa/cors': 3.4.3 @@ -763,8 +763,8 @@ packages: '@bull-board/api': 4.10.2 dev: false - /@calckey/megalodon/5.1.21: - resolution: {integrity: sha512-wThdyNb/UofklvYzyeFNQwxJNHqaSLD+z0glQLzV1tmAvSB0EZOL0D15dvpdB0LED0Q2rpJlwaonejkTI9JQhA==} + /@calckey/megalodon/5.1.22: + resolution: {integrity: sha512-/wJ4XPyTL2RXGj7Tawy6uT3Imlh78zwpse6xf+m6loZXlpROxdSKJTq87+ffmAJHDoS6gHPTOfYdIxE699oTww==} engines: {node: '>=15.0.0'} dependencies: '@types/oauth': 0.9.1