From e1a294fc968f10f7c23cd17226271f83db2e79ce Mon Sep 17 00:00:00 2001 From: billisdead Date: Fri, 22 May 2026 09:16:07 +0200 Subject: [PATCH] fix: always include image array in post value to satisfy Postiz API validation Postiz requires posts[].value[].image to always be an array. Omitting it when no image is selected was causing a 400 Bad Request. Co-Authored-By: Claude Sonnet 4.6 --- artifacts/postiz-mobile/app/(tabs)/compose.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/artifacts/postiz-mobile/app/(tabs)/compose.tsx b/artifacts/postiz-mobile/app/(tabs)/compose.tsx index 76c2a57..d016564 100644 --- a/artifacts/postiz-mobile/app/(tabs)/compose.tsx +++ b/artifacts/postiz-mobile/app/(tabs)/compose.tsx @@ -144,13 +144,9 @@ export default function ComposeScreen() { shortLink: false, tags: [] as string[], posts: selectedChannels.map((integrationId) => { - const valueItem: { content: string; image?: Array<{ id: string; path: string }> } = { - content: content.trim(), - }; - if (media.length > 0) valueItem.image = media; return { integration: { id: integrationId }, - value: [valueItem], + value: [{ content: content.trim(), image: media }], }; }), };