fix(channels): restore multi-room listening for Matrix allowed_rooms#4700
fix(channels): restore multi-room listening for Matrix allowed_rooms#4700rareba wants to merge 1 commit intozeroclaw-labs:masterfrom
Conversation
Closes zeroclaw-labs#4658 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This looks to be in competition with a PR I previously opened (#4674). |
|
Understood — happy to defer to #4674 if it covers the same multi-room listening fix. Thanks for flagging the overlap! |
|
Hey — this PR currently has failing CI checks. Could you rebase against current |
|
Hi — I've been tracking the issues in the Matrix friction tracker (#4657) and am waiting on these fixes to land. If this PR isn't actively being maintained toward merge (responding to review feedback, rebasing, etc.), I'll submit a competing PR to make sure the fix gets in. Happy to collaborate if you're still working on it! |
|
Hi @singlerider — this PR is being deferred in favor of #4674 which covers the same multi-room listening fix. Feel free to go ahead with your competing PR if #4674 needs further work. I won't be maintaining this one. Recommending closure. |
Summary
allowed_roomsis configured, the Matrix bot now listens and responds in all listed rooms, not just the singleroom_idallowed_roomsis empty, behavior is unchanged (singleroom_idonly)Root cause
The event handler had two sequential checks: first
room_matches_target(rejecting anything not fromroom_id), thenis_room_allowed_static. Since the first check already rejected messages from other rooms, the second was dead code for multi-room scenarios. Commit0051a0c2re-introduced this regression.Fix
Replaced the two sequential checks with a single combined check:
Files changed
src/channels/matrix.rs— combined room filter logic + improved startup logTest plan
allowed_rooms = []+room_idset: bot listens in single room only (unchanged)allowed_rooms = ["!room1:srv", "!room2:srv"]: bot responds in both roomsCloses #4658