From 3e748cb401a0dc70e2be651e00e21aec576d4763 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Sat, 18 Mar 2023 12:23:03 +0100 Subject: [PATCH] fix: intermediarily convert ids --- .../backend/src/server/api/mastodon/endpoints/account.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index 8c6622964..ae8f9a786 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -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);