fix(scheduled-posts): prevent null content from being posted #24

Merged
zooper merged 1 commit from fix/scheduled-posts-null-content into main 2025-08-12 15:19:39 +00:00
zooper commented 2025-08-12 15:18:55 +00:00 (Migrated from github.com)
  • Fix parameter passing inconsistency between Instagram and Pixelfed posting functions
  • Add comprehensive null safety checks in both postToPixelfedCron and postToInstagramCron
  • Implement hard fail for posts without valid captions (no fallback message)
  • Add debug logging to track content preparation in handleScheduledPosts
  • Handle null, "null" string, empty, and whitespace-only captions properly
  • Update database status to 'failed' with clear error message when no caption provided

This resolves the issue where scheduled posts would appear with "null" text content on Instagram and Pixelfed by ensuring only posts with valid captions are processed.

Fixes scheduled posting content validation

- Fix parameter passing inconsistency between Instagram and Pixelfed posting functions - Add comprehensive null safety checks in both postToPixelfedCron and postToInstagramCron - Implement hard fail for posts without valid captions (no fallback message) - Add debug logging to track content preparation in handleScheduledPosts - Handle null, "null" string, empty, and whitespace-only captions properly - Update database status to 'failed' with clear error message when no caption provided This resolves the issue where scheduled posts would appear with "null" text content on Instagram and Pixelfed by ensuring only posts with valid captions are processed. Fixes scheduled posting content validation
cloudflare-workers-and-pages[bot] commented 2025-08-12 15:19:16 +00:00 (Migrated from github.com)

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
Deployment successful!
View logs
ai-caption-studio 252250d0 Commit Preview URL

Branch Preview URL
Aug 12 2025, 03:19 PM
## Deploying with &nbsp;<a href="https://workers.dev"><img alt="Cloudflare Workers" src="https://workers.cloudflare.com/logo.svg" width="16"></a> &nbsp;Cloudflare Workers The latest updates on your project. Learn more about [integrating Git with Workers](https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/). | Status | Name | Latest Commit | Preview URL | Updated (UTC) | | -|-|-|-|-| | ✅ Deployment successful! <br>[View logs](https://dash.cloudflare.com/a3886cd60d9d98381472be25235a1347/workers/services/view/ai-caption-studio/production/builds/2ca3a3c1-c6ea-4d08-87f8-b9b5f7cf0eb7) | ai-caption-studio | 252250d0 | <a href='https://e75a2326-ai-caption-studio.jonsson.workers.dev'>Commit Preview URL</a><br><br><a href='https://fix-scheduled-posts-null-content-ai-caption-studio.jonsson.workers.dev'>Branch Preview URL</a> | Aug 12 2025, 03:19 PM |
Sign in to join this conversation.
No description provided.