fix(mobile): restore images on repost, improve media library 404 error, null-safe stripHtml
Release APK / build (push) Has been cancelled
Release APK / build (push) Has been cancelled
- Pass post.image[] as JSON prefillImages param when prefilling compose from an existing post (repost/edit/retry), replacing the broken single-image prefillImagePath/prefillImageId approach - MediaLibraryModal now shows the attempted URL and a clear explanation on 404, making it easier to diagnose if the Postiz version does not expose GET /media - stripHtml accepts null/undefined input and returns "" instead of throwing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -152,13 +152,14 @@ export default function PostsScreen() {
|
||||
|
||||
const handlePrefillCompose = (post: PostizPost) => {
|
||||
const integrations = post.integrations ?? (post.integration ? [post.integration] : []);
|
||||
router.push({
|
||||
pathname: "/(tabs)/compose",
|
||||
params: {
|
||||
prefillContent: stripHtml(post.content),
|
||||
prefillIntegrationIds: integrations.map((i) => i.id).join(","),
|
||||
},
|
||||
});
|
||||
const params: Record<string, string> = {
|
||||
prefillContent: stripHtml(post.content),
|
||||
prefillIntegrationIds: integrations.map((i) => i.id).join(","),
|
||||
};
|
||||
if (post.image?.length) {
|
||||
params.prefillImages = JSON.stringify(post.image);
|
||||
}
|
||||
router.push({ pathname: "/(tabs)/compose", params });
|
||||
};
|
||||
|
||||
const startReschedule = (post: PostizPost) => {
|
||||
|
||||
Reference in New Issue
Block a user