fix: intermediarily convert ids

This commit is contained in:
cutestnekoaqua 2023-03-18 12:23:03 +01:00
parent 624d3c399f
commit 04c1b395b4
No known key found for this signature in database
GPG Key ID: 6BF0964A5069C1E0
1 changed files with 6 additions and 1 deletions

View File

@ -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);