Bug Description
When using send_message tool to send files to Feishu, the media_files parameter is not passed to the _send_feishu() function, causing file attachments to be silently dropped.
Root Cause
In tools/send_message_tool.py, line ~425, the code calls:
elif platform == Platform.FEISHU:
result = await _send_feishu(pconfig, chat_id, chunk, thread_id=thread_id)
The media_files parameter is missing from this call. Compare with the Telegram implementation which correctly passes media_files:
result = await _send_telegram(
pconfig.token,
chat_id,
chunk,
media_files=media_files if is_last else [],
thread_id=thread_id,
)
The Fix
Change line 425 to:
elif platform == Platform.FEISHU:
result = await _send_feishu(pconfig, chat_id, chunk, media_files=media_files, thread_id=thread_id)
The _send_feishu() function at line 974 already correctly accepts and processes media_files:
async def _send_feishu(pconfig, chat_id, message, media_files=None, thread_id=None):
# ... correctly handles media_files for images, videos, voice, audio, and documents
Impact
- Files sent via
MEDIA:/path/to/file syntax are silently dropped for Feishu platform
- Only text messages are sent, attachments are lost
- Other platforms (Telegram, QQBot, etc.) work correctly
Verification
Test by sending a file via Feishu using the MEDIA:/path/to/file syntax in a message.
Bug Description
When using
send_messagetool to send files to Feishu, themedia_filesparameter is not passed to the_send_feishu()function, causing file attachments to be silently dropped.Root Cause
In
tools/send_message_tool.py, line ~425, the code calls:The
media_filesparameter is missing from this call. Compare with the Telegram implementation which correctly passesmedia_files:The Fix
Change line 425 to:
The
_send_feishu()function at line 974 already correctly accepts and processesmedia_files:Impact
MEDIA:/path/to/filesyntax are silently dropped for Feishu platformVerification
Test by sending a file via Feishu using the
MEDIA:/path/to/filesyntax in a message.