From 21061b680383a1429b2c74fa4ad87489192810a9 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 9fa73242a06ca6cfb6dcb7d17ce38f8aa0f25126 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