Skip to content

[Bug]: _send_via_adapter ignores media_files parameter — file attachments broken for qqbot #23760

@yuchuan99

Description

@yuchuan99

Bug Description

File: tools/send_message_tool.py, line 461
Bug: adapter.send(chat_id=chat_id, content=chunk) — media_files and force_document are ignored
Impact: send_message(media="/path/to/file.pdf") sends text only, no attachment, on all platforms (qqbot, telegram, etc.)
Fix: pass media_files and force_document to adapter.send()

Steps to Reproduce

send_message(media="/tmp/xxx.pdf")

Expected Behavior

get a pdf file

Actual Behavior

url only

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

No response

Debug Report

qqbot

Operating System

Ubuntu 24.04

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

send_message_tool.py:461
result = await adapter.send(chat_id=chat_id, content=chunk,
media_files=media_files, force_document=force_document)

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryplatform/qqbotQQ Bot adaptertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions