From 6606abd7d9735fa9a40c578b7bfae773235f1e6f Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 5 Jul 2023 20:35:44 +0200 Subject: [PATCH] [mastodon-client] Fix posting statuses with attachment --- packages/backend/src/server/api/mastodon/endpoints/status.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index 759faeef96..b6475dcf2d 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -59,6 +59,9 @@ export function apiStatusMastodon(router: Router): void { } if (!body.media_ids) body.media_ids = undefined; if (body.media_ids && !body.media_ids.length) body.media_ids = undefined; + if (body.media_ids) { + body.media_ids = (body.media_ids as string[]).map(p => convertId(p, IdType.CalckeyId)); + } const { sensitive } = body; body.sensitive = typeof sensitive === "string" ? sensitive === "true" : sensitive;