#19294: fix: normalize room ID case in Matrix config lookup
channel: matrix
size: XS
trusted-contributor
Cluster:
Matrix Room Management Enhancements
Fixes #19278
## What changed
- Normalize room ID and aliases to lowercase in resolveMatrixRoomConfig() before building lookup candidates
- This ensures case-insensitive matching between the room ID from Matrix events and the config entries
## AI-assisted contribution
- This fix was generated by an AI agent (OpenClaw cron: gh-issues-fix)
- Testing depth: validated with pnpm build && pnpm check && pnpm test
- The fix addresses the root cause described in the issue by normalizing the room ID to lowercase before lookup, ensuring config entries stored in any case can be found regardless of the case used in Matrix events
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Normalized Matrix room IDs and aliases to lowercase before config lookup to enable case-insensitive matching between Matrix events and configuration entries.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The change is minimal, well-commented, and addresses a specific bug. The normalization to lowercase is consistent with Matrix server behavior and other parts of the codebase that normalize Matrix IDs.
- No files require special attention
<sub>Last reviewed commit: a1357d8</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#19388: Fix #19278: Case-insensitive Matrix room ID matching
by cedillarack · 2026-02-17
88.1%
#10606: fix(matrix): keep room IDs without :server suffix as-is during reso...
by majorminors · 2026-02-06
83.2%
#19304: fix(matrix): preserve room ID casing in directory resolution (#19278)
by lailoo · 2026-02-17
81.0%
#13451: feat(matrix): add forceRoomRouting to bypass DM detection for allow...
by yamoroc · 2026-02-10
75.4%
#9106: fix(matrix): override DM detection for rooms in groups config
by robertcorreiro · 2026-02-04
75.0%
#20278: Fix/matrix missing bot sdk dependency
by saurav470 · 2026-02-18
74.2%
#12028: fix: normalize // to / for Matrix client escaped commands
by githabideri · 2026-02-08
73.5%
#13057: feat(matrix): add sessionScope=room to route sessions by roomId
by spengrah · 2026-02-10
73.2%
#20025: Fix Matrix messages silently dropped due to zero startup grace
by Clawborn · 2026-02-18
73.1%
#7842: Fix Matrix mention detection for Element client (formatted_body links)
by emadomedher · 2026-02-03
71.8%