b02bdba4e6dd7b8df11e4a4ff1f85b3d0f8a6e2c
Problem: engine container has no mount to /var/www/zeropost-uploads/, so
fs.existsSync() always returned false. This made image_url=null for every
Zero draft, and the TG runner fell back to sendMessage (text-only, no avatar).
Fix:
- zeroCharacter.js: drop fs.existsSync entirely; AVAILABLE_POSES is now a
static Set synced with what's actually on uploads-server (23 poses
including avatar/eureka/lock/gears/etc. — earlier I incorrectly thought
there were only 10). FALLBACK_POSE = 'coffee' (more on-brand than avatar).
- zeroNotes.js: image_url unconditionally '/uploads/zero-{pose}.webp';
pickPose now also looks at the generated content (not only theme).
- zeroNotesRunner.js: sendPhoto by URL (Telegram fetches the image itself).
No more form-data/createReadStream — full URL composed from
ZERO_PUBLIC_BASE_URL setting (default https://zeropost.ru).
- zeroAdmin.js: ZERO_PUBLIC_BASE_URL added to CONFIG_KEYS so it's editable
via /admin/zero settings panel.
Existing draft #1 backfilled via SQL UPDATE (pose=eureka → image_url set).
zeropost-engine
ZeroPost - zeropost-engine
Description
Languages
JavaScript
100%