diff --git a/packages/backend/package.json b/packages/backend/package.json index 910ffd3748..ce6efde9c2 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.2", + "@calckey/megalodon": "5.1.21", "mfm-js": "0.23.2", "mime-types": "2.1.35", "multer": "1.4.4-lts.1", diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index bd1a2e6485..ae8f9a786a 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -33,10 +33,10 @@ export function apiAccountMastodon(router: Router): void { let acct = data.data; acct.id = convertId(acct.id, IdType.MastodonId); acct.url = `${BASE_URL}/@${acct.url}`; - acct.note = ""; + acct.note = acct.note || ""; acct.avatar_static = acct.avatar; - acct.header = acct.header || ""; - acct.header_static = acct.header || ""; + acct.header = acct.header || "https://http.cat/404"; + acct.header_static = acct.header || "https://http.cat/404"; acct.source = { note: acct.note, fields: acct.fields, @@ -338,8 +338,13 @@ export function apiAccountMastodon(router: Router): void { ctx.body = [relationshipModel]; return; } + + let reqIds = []; + for (let i = 0; i < ids.length; i++) { + reqIds.push(convertId(ids[i], IdType.CalckeyId)); + } - const data = await client.getRelationships(ids); + const data = await client.getRelationships(reqIds); let resp = data.data; for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index 0128201400..38199740a3 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -105,7 +105,12 @@ export function apiStatusMastodon(router: Router): void { const id = ctx.params.id; const data = await client.getStatusContext(id, limitToInt(ctx.query as any)); const status = await client.getStatus(id); - const reactionsAxios = await axios.get( + let reqInstance = axios.create({ + headers: { + Authorization : ctx.headers.authorization + } + }); + const reactionsAxios = await reqInstance.get( `${BASE_URL}/api/notes/reactions?noteId=${id}`, ); const reactions: IReaction[] = reactionsAxios.data; diff --git a/packages/client/src/components/MkNoteDetailed.vue b/packages/client/src/components/MkNoteDetailed.vue index ac948b8ce1..f29129f87d 100644 --- a/packages/client/src/components/MkNoteDetailed.vue +++ b/packages/client/src/components/MkNoteDetailed.vue @@ -301,7 +301,7 @@ if (appearNote.replyId) { os.api('notes/conversation', { noteId: appearNote.replyId, }).then(res => { - conversation.value = res; + conversation.value = res.reverse(); }); } diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index c204cb2f9f..48e9866d8d 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -10,11 +10,13 @@

+ +

- +
@@ -22,10 +24,10 @@