Repository navigation
Conversation
Without a running gateway, core routes a media send to ``standalone_sender_fn`` with ``media_files`` / ``force_document``. ``_send_via`` called only ``adapter.send``, so the text landed and the attachment was dropped while the send reported success. Send the text, then each file through its native adapter method (document when forced) and surface an upload failure instead of dropping it. Relates to NousResearch/hermes-agent#153045.
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.
What does this PR do?
When no live gateway adapter is available, core routes a media send to the plugin's
standalone_sender_fnwithmedia_files/force_document._send_viacalled onlyadapter.send, so the text landed and the attachment was dropped while the send reported success.Now it sends the text, then each file through its native adapter method (
send_image_file/send_video/send_voice, orsend_documentwhen forced), and returns an error when an upload fails instead of reporting success.Relates to NousResearch/hermes-agent#153045 (the report against core). This is the same fix as my hermes-agent#153227, re-filed here now that WeCom lives in this repo.
Test plan
PYTHONPATH=<hermes-agent> python -m pytest wecom/tests/test_wecom_standalone_media.py -q— 5 passed: image ridessend_image_file,force_documentroutes tosend_document, a voice-only send skips the empty text bubble, a failed upload is reported, a text-only send is unchanged.Full
wecom/suite: 100 passed, 2 failed (test_connect_records_handshake_failure_details,test_download_remote_bytes_blocks_connect_time_rebind); both fail identically on the unmodified tree and are environment (httpx proxy/IPv6) issues.