fix: forward mediaLocalRoots in whatsapp plugin sendMedia#23148
Closed
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix: forward mediaLocalRoots in whatsapp plugin sendMedia#23148MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
Conversation
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
34143a0 to
a5f2a97
Compare
14 tasks
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #23140
Root cause
extensions/whatsapp/src/channel.tssendMediawas not destructuringor forwarding
mediaLocalRootsfrom the outbound context, so the mediavalidation function received
undefinedroots and fell back to defaultsthat excluded the agent workspace — throwing
LocalMediaAccessError.Fix
Add
mediaLocalRootsto the parameter destructure and forward it tosendMessageWhatsApp, matching the correct implementation insrc/channels/plugins/outbound/whatsapp.ts.Tests
Added
extensions/whatsapp/src/channel.outbound.test.tswith aregression test verifying
mediaLocalRootsis forwarded on thesendMediaadapter path.Greptile Summary
Fixed
extensions/whatsapp/src/channel.tssendMediato forwardmediaLocalRootsparameter tosendMessageWhatsApp, matching the correct implementation insrc/channels/plugins/outbound/whatsapp.ts. Without this parameter, the media validation function receivedundefinedroots and fell back to defaults that excluded the agent workspace, throwingLocalMediaAccessError. Added regression test to verify the parameter is properly forwarded.Confidence Score: 5/5
mediaLocalRootsparameter 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 withoutmediaLocalRoots). The code follows existing patterns and is type-safe.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!