fix(rooms): resolve room ids missing or mangling the server name #152
No reviewers
Labels
No labels
blocked
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jlxq0/matrix-mcp!152
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/room-id-resolution"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Agents call
read_recent_messageswith room ids the server cannot place:!KsFsfVrDOIylxbNokX(no server name),!iwGDzdrwuZfnQNFszT:kಂಪong.social(server name garbled by the model), and placeholders such as!current. The answer wasnot joined to …, which gives the model no way to recover.Change
resolve_roomused by every tool that takes aroom_id(29 call sites) and bymessage_forwardforsource_room_id/target_room_id.not joined to …/invalid room_id …prefix and addsPass the full room id including the server name, exactly as list_joined_rooms returns it (e.g. !abc:<homeserver>); call list_joined_rooms to find the room.room_idparameter descriptions state the full-id format.accept/reject inviteand theno such roompath keep their exact-id lookups.Tests: unit tests for localpart extraction, bare and mangled ids resolving, placeholders/prefixes/case not resolving, ambiguity, and the hint.
cargo fmt --check,cargo clippy --all-targets --all-features --locked -D warnings(1.98.0) andcargo test --all-features --locked(366 + 6 passed) are green locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01BbPgHm7ND8CnztzqxLEn5T