openclaw - ✅(Solved) Fix sending media on whatsapp [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#66090Fetched 2026-04-14 05:39:09
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

openclaw message send --media ... sends text to WhatsApp, but does not attach the media.

Error Message

[whatsapp] Sending message -> sha256:287c5b20ea2a
[whatsapp] Sent message ... -> sha256:287c5b20ea2a (...)

Notably, the log never shows (media).

Root Cause

openclaw message send --media ... sends text to WhatsApp, but does not attach the media.

Fix Action

Fixed

PR fix notes

PR #66117: fix(cli): restore media attachment support for WhatsApp messages

Description (problem / solution / changelog)

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: The --media flag in the CLI message send command was ignored, causing media attachments to fail (regression from 3.8 to 4.9).
  • Why it matters: Users cannot send images or files via WhatsApp or other channels using the CLI, breaking a documented feature.
  • What changed: Updated src/cli/message-cli.ts to extract the media argument and pass it as mediaUrl to the sendMessage function.
  • What did NOT change (scope boundary): The underlying sendMessage logic, adapter implementations, or configuration loading remain untouched.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #66090

User-visible / Behavior Changes

Running openclaw message send --channel whatsapp --target ... --media <path> will now successfully attach the media file to the message instead of sending only the text content.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: N/A (AI-generated)
  • Runtime/container: N/A
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted): N/A

Steps

  1. Execute openclaw message send --channel whatsapp --target <number> --media "C:\path\to\image.png" --message "Testing~".
  2. Check the logs for the (media) indicator.
  3. Verify the recipient receives the image attachment.

Expected

The message is sent with the image attached. Logs indicate [whatsapp] Sent message ... -> sha256:... (...) (media).

Actual

Previously, only the text was sent. With this fix, the media is attached and sent.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: local scoped validation and targeted checks for the changed area passed
  • Edge cases checked: relevant changed-path scenarios covered by selected validation
  • What you did not verify: full repository integration coverage beyond the selected validation scope

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)
  • If yes, exact upgrade steps: N/A

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: Revert the commit or remove the mediaUrl: media line in src/cli/message-cli.ts.
  • Files/config to restore: src/cli/message-cli.ts
  • Known bad symptoms reviewers should watch for: If the media argument is malformed, the underlying adapter should handle the error; this change merely ensures the argument is passed through.

Risks and Mitigations

None. The change restores a missing parameter pass-through that was accidentally dropped, aligning the CLI behavior with the expected function signature.

Changed files

  • src/cli/message-cli.ts (added, +47/-0)

Code Example

### Repro

---

Also tested:

---



---

### Expected
WhatsApp message is sent with the image/audio attached.

### Logs

---

Notably, the log never shows `(media)`.

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

3.8 to 4.9 version.

Summary

openclaw message send --media ... sends text to WhatsApp, but does not attach the media.

Version

OpenClaw 2026.4.9 (0512059)

Steps to reproduce

### Repro
```bash
openclaw message send --channel whatsapp --target +60xxxxx --media "C:\Users\Wapapapow\.openclaw\media\output.png" --message "Testing~"

Also tested:

openclaw message send --channel whatsapp --target +60xxxxx --media "file:///C:/Users/Wapapapow/.openclaw/media/output.png" --message "Testing~"

### Expected behavior

Expected

WhatsApp message is sent with the image/audio attached.

Logs

[whatsapp] Sending message -> sha256:287c5b20ea2a
[whatsapp] Sent message ... -> sha256:287c5b20ea2a (...)

Notably, the log never shows (media).


### Actual behavior

### Actual
Only the text message is sent. No media is attached.


### OpenClaw version

2026.4.9

### Operating system

Windows 11

### Install method

Npm global 

### Model

Minimax/glm or any other

### Provider / routing chain

Not sure

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue with openclaw message send not attaching media to WhatsApp messages may be related to how the media file path is handled, and using a different path format or checking the file's existence and accessibility could resolve the issue.

Guidance

  • Verify that the media file exists at the specified path (C:\Users\Wapapapow\.openclaw\media\output.png) and is accessible by the openclaw process.
  • Try using a relative path or an absolute path without the file:/// protocol to specify the media file, as the current format might not be correctly interpreted.
  • Check if there are any permissions issues with the media file or its directory that could prevent openclaw from accessing it.
  • Review the openclaw documentation or source code to see if there are specific requirements or restrictions for specifying media file paths.

Example

No specific code example can be provided without more context about the openclaw command's implementation details.

Notes

The solution might depend on specifics of the openclaw version 2026.4.9 and its handling of file paths on Windows 11. If the issue persists, checking the openclaw logs for more detailed error messages or seeking support from the openclaw community might be necessary.

Recommendation

Apply workaround: Try adjusting the media file path format or checking file accessibility, as this is a non-invasive approach that can potentially resolve the issue without requiring updates to openclaw itself.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING