-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
[Bug]: Matrix: per-room requireMention/autoReply config ignored due to room ID case mismatch #19278
Description
Summary
Per-room group config settings (requireMention: false, autoReply: true) are silently ignored for Matrix rooms. The root cause is a case mismatch: room IDs are lowercased during config resolution at startup, but the message handler receives original-case room IDs from Matrix events and performs exact-case lookups. The config entry is never found, so the handler falls back to requireMention: true.
Steps to reproduce
- Configure a Matrix room with requireMention: false in openclaw.json:
"channels": {
"matrix": {
"groupPolicy": "open",
"groups": {
"!ArAQdbw5b42R5uBHuWz84xs6GI-Lf_4khGLMHPyTNzp": {
"allow": true,
"requireMention": false
}
}
}
}
- Restart the gateway
- Send a message in that room without mentioning the bot
- Observe the gateway logs
Expected behavior
The bot should process all messages in the room without requiring a mention, since requireMention: false is set for that room.
Actual behavior
matrix rooms resolved: !ArAQdbw5b42R5uBHuWz84xs6GI-Lf_4khGLMHPyTNzp→!araqdbw5b42r5ubhuwz84xs6gi-lf_4khglmhpytnzp
...
matrix-auto-reply skipping room message { roomId: "...", reason: "no-mention" }
The resolution step lowercases the room ID key in the internal roomsConfig map, but the handler's resolveMatrixRoomConfig() builds lookup candidates using the original-case room ID from the Matrix event. The exact-match lookup in resolveChannelEntryMatch() (Object.prototype.hasOwnProperty.call(entries, key)) fails because !ArAGdbw5... ≠ !aragdbw5...
OpenClaw version
2026.2.15
Operating system
Debian 1:6.12.62-1+rpt1 (2025-12-18) aarch64
Install method
curl -fsSL https://openclaw.ai/install.sh | bash
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response