fix(send_message): pass media_files to _send_feishu in _send_to_platform#14494
Open
batmanhz wants to merge 1 commit into
Open
fix(send_message): pass media_files to _send_feishu in _send_to_platform#14494batmanhz wants to merge 1 commit into
batmanhz wants to merge 1 commit into
Conversation
65aa87c to
97cdb2e
Compare
_send_to_platform() was omitting media attachments when routing to Feishu/Lark targets via the send_message tool. Add a dedicated media-handling block for Feishu (matching the pattern used by Telegram, Discord, and Matrix) that: - Enumerates message chunks correctly - Passes media_files only on the final chunk - Returns early after processing, bypassing the generic fallback Note: _send_feishu() already supports media via FeishuAdapter methods (send_image_file, send_video, send_voice, send_document) — it just wasn't being called with the media_files parameter. Normal agent responses using MEDIA: syntax were unaffected since they go through BasePlatformAdapter.extract_media() in the gateway main loop.
97cdb2e to
72b0d86
Compare
Collaborator
This was referenced Apr 24, 2026
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.
Problem
The
send_messagetool silently drops media attachments when targeting Feishu/Lark.When
_send_to_platform()routes to Feishu, it calls_send_feishu()without passing themedia_filesparameter:This affects all other platforms (Telegram, Discord, Matrix, Weixin) correctly pass
media_filesin their respective branches.Fix
Pass
media_filesto_send_feishu(), following the same pattern as Telegram/Discord/Matrix — media is only attached to the final chunk when a message is split:Notes
_send_feishu()function already fully supports media (images, video, voice, documents) via the FeishuAdapter methods — it just wasn't being called with the parameter.MEDIA:syntax were unaffected because they go throughBasePlatformAdapter.extract_media()in the gateway main loop, bypassing_send_to_platform()entirely.