From 2e8598acb5bc10d6460489173ea8344ccf05d45e Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 30 Nov 2023 16:40:30 +0100 Subject: [PATCH] [mastodon-client] Fix /v1/accounts/relationships for clients that don't use the id[] parameter --- packages/backend/src/server/api/mastodon/endpoints/account.ts | 4 +++- 1 file changed, 3 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 ae642857a..e453ce63d 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -31,7 +31,9 @@ export function setupEndpointsAccount(router: Router): void { router.get("/v1/accounts/relationships", auth(true, ['read:follows']), async (ctx) => { - const ids = (normalizeUrlQuery(ctx.query, ['id[]'])['id[]'] ?? []); + const ids = normalizeUrlQuery(ctx.query, ['id[]'])['id[]'] + ?? normalizeUrlQuery(ctx.query, ['id'])['id'] + ?? []; ctx.body = await UserHelpers.getUserRelationhipToMany(ids, ctx.user.id); } );