← Back to library

WhatsApp 支持 media-only 发送并清洗空白负载

用于‘发图/文件时经常因为 message 为空被拒’场景:放宽 send 校验为 text/media 二选一,并在发送链路自动清理前导空行与空白 caption。

GITHUBDiscovered 2026-02-12Author karimnaguib
Prerequisites
  • You are using WhatsApp channel and can run a build containing PR #14408.
  • You can run channel smoke tests with text/media/caption combinations.
Steps
  1. Upgrade to build with PR #14408 and restart gateway.
  2. Send media-only payload (without message text) and confirm it is accepted.
  3. Send caption-only media payload and verify caption is promoted to message when needed.
  4. Send text with leading blank lines and confirm normalization removes noisy whitespace.
  5. Confirm empty payload (no text and no media) is still rejected.
Commands
openclaw gateway status
openclaw gateway restart
Verify

Media-only sends are delivered, whitespace-only text payloads are dropped, and invalid empty sends are rejected.

Caveats
  • Behavior is channel-specific; do not assume Telegram/Discord share the same normalization path(需验证).
  • Large media still depends on provider upload limits and network stability.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post