Skip to content

fix: forward mediaLocalRoots in whatsapp plugin sendMedia#23148

Closed
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
MunemHashmi:fix/whatsapp-media-local-roots-forwarding
Closed

fix: forward mediaLocalRoots in whatsapp plugin sendMedia#23148
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
MunemHashmi:fix/whatsapp-media-local-roots-forwarding

Conversation

@MunemHashmi
Copy link
Copy Markdown
Contributor

@MunemHashmi MunemHashmi commented Feb 22, 2026

Fixes #23140

Root cause

extensions/whatsapp/src/channel.ts sendMedia was not destructuring
or forwarding mediaLocalRoots from the outbound context, so the media
validation function received undefined roots and fell back to defaults
that excluded the agent workspace — throwing LocalMediaAccessError.

Fix

Add mediaLocalRoots to the parameter destructure and forward it to
sendMessageWhatsApp, matching the correct implementation in
src/channels/plugins/outbound/whatsapp.ts.

Tests

Added extensions/whatsapp/src/channel.outbound.test.ts with a
regression test verifying mediaLocalRoots is forwarded on the
sendMedia adapter path.

Greptile Summary

Fixed extensions/whatsapp/src/channel.ts sendMedia to forward mediaLocalRoots parameter to sendMessageWhatsApp, matching the correct implementation in src/channels/plugins/outbound/whatsapp.ts. Without this parameter, the media validation function received undefined roots and fell back to defaults that excluded the agent workspace, throwing LocalMediaAccessError. Added regression test to verify the parameter is properly forwarded.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix is a straightforward parameter forwarding issue with clear root cause analysis. The change correctly adds the missing mediaLocalRoots parameter to both the destructure and the forwarding call, matching the reference implementation. The regression test thoroughly validates the fix by checking both cases (with and without mediaLocalRoots). The code follows existing patterns and is type-safe.
  • No files require special attention

Last reviewed commit: 34143a0

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web size: S labels Feb 22, 2026
The sendMedia callback in extensions/whatsapp/src/channel.ts was not
destructuring or forwarding mediaLocalRoots from the outbound context,
causing LocalMediaAccessError when sending local workspace media files.

Mirrors the correct implementation in src/channels/plugins/outbound/whatsapp.ts.

Fixes openclaw#23140
@openclaw-barnacle
Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Feb 28, 2026
@openclaw-barnacle
Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: whatsapp-web Channel integration: whatsapp-web size: S stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: LocalMediaAccessError when sending media files in local workspace via WhatsApp extension plugin

1 participant