fix(simplex): accept non-audio file transfers via /freceive - #55185
Open
liuhao1024 wants to merge 4 commits into
Open
liuhao1024 wants to merge 4 commits into
liuhao1024 wants to merge 4 commits into
Conversation
The deferred-file guard only triggered for audio extensions, silently dropping images, PDFs, and other documents that hadn't finished downloading via XFTP. Remove the audio-only restriction so all pending file transfers are accepted and deferred until rcvFileComplete. Fixes NousResearch#55180
tonydwb
reviewed
Jun 30, 2026
tonydwb
left a comment
There was a problem hiding this comment.
LGTM. Clean 2-file fix accepting non-audio file transfers via /freceive in SimpleX. Well-scoped with proper MIME type handling.
13 tasks
Collaborator
|
Thanks for the focused SimpleX fix. The premise is confirmed on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
Open
4 tasks
This branch has not been deployed
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?
The SimpleX adapter only accepts XFTP file transfers (via
/freceive) for audio files. Images, PDFs, and other documents sent over XFTP are silently dropped — the message arrives as text-only, with no attachment.The root cause is an audio-only guard on the deferred-file code path:
if not file_path and _is_audio_ext(ext) and file_id is not None. Non-audio files without afilePath(still downloading) fall through to theif file_path:block, which skips them entirely.This PR removes the
_is_audio_ext(ext)restriction so all pending file transfers are accepted and deferred untilrcvFileCompletefires, regardless of file type.Related Issue
Fixes #55180
Type of Change
Changes Made
plugins/platforms/simplex/adapter.py: Removed_is_audio_ext(ext)from the pending-file guard so images, documents, and all other file types are accepted via/freceiveand deferred until download completes. Updated comment and log message to reflect the broader scope.tests/gateway/test_simplex_plugin.py: Added_make_pending_file_chat_itemhelper for files not yet downloaded. Addedtest_pending_image_file_accepts_transferandtest_pending_document_file_accepts_transferregression tests.How to Test
python -m pytest tests/gateway/test_simplex_plugin.py -v— all 32 tests should pass, including the two newtest_pending_*tests.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A