-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug]: Matrix message tool ignores audioAsVoice parameter #32489
Copy link
Copy link
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crash
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
The message tool's audioAsVoice parameter is not wired to the Matrix channel plugin, causing audio files to be sent as generic m.file attachments instead of m.audio voice messages (MSC3245).
Steps to reproduce
- Configure Matrix channel (already ON/OK)
- Generate OGG/Opus audio file:
curl -X POST http://localhost:8877/v1/audio/speech -d '{"input":"test","voice":"af_heart","response_format":"opus"}' -o voice.ogg - Send via
messagetool with voice flag:{ "action": "send", "channel": "matrix", "media": "./voice.ogg", "mimeType": "audio/ogg; codecs=opus", "asVoice": true } - Try alternate parameter:
{ "audioAsVoice": true }
Expected behavior
Audio should appear as an inline voice message bubble (playable inline) using MSC3245 format with org.matrix.msc3245.voice metadata and duration info.
Actual behavior
Audio appears as a file attachment (downloadable file) instead of inline voice player. Matrix event shows msgtype: "m.file" instead of msgtype: "m.audio" with voice metadata.
OpenClaw version
2026.3.1
Operating system
Linux 6.12.48+deb13-amd64 (Docker)
Install method
No response
Logs, screenshots, and evidence
| Test | Parameter | Result |
|------|-----------|--------|
| Test 1 | `asVoice: true` | ❌ File attachment |
| Test 2 | `audioAsVoice: true` | ❌ File attachment |
| Test 3 | Various `mimeType` combos | ❌ File attachment |
| Test 4 | Resend user's own voice file via `media` | ❌ File attachment |
| Control | User's file sent natively from Element | ✅ Inline voice player |
Matrix plugin (`send.ts`, `media.ts`) supports `audioAsVoice` internally and injects proper MSC3245 metadata, but the `message` tool abstraction layer doesn't pass this parameter to the channel.Impact and severity
- Affected: Matrix users wanting voice message automation
- Severity: Medium (feature gap — voice messages technically supported but inaccessible)
- Frequency: 100% repro when using
messagetool - Consequence: Cannot send voice messages programmatically; workaround requires browser automation or manual Element client use
- Not a regression: Feature appears never to have been wired through tool layer
Additional information
Related code locations:
- Matrix plugin supports voice:
/extensions/matrix/src/matrix/send/media.ts(lines ~60-70 injectorg.matrix.msc3245.voice) messagetool definition: Tool schema doesn't exposeaudioAsVoicefor Matrix channel
Suggested fix: Either:
- Add
audioAsVoiceparameter tomessagetool schema and wire to MatrixsendMedia()call - Auto-detect opus/ogg audio and default to voice message format for Matrix
References:
- Matrix MSC3245: https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3245-voice-messages.md
- OpenClaw Matrix plugin tests:
send.test.ts(testsaudioAsVoicefunctionality at plugin level)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crash
Type
Fields
Give feedbackNo fields configured for issues without a type.