feat(matrix): add multi-room support#3224
Closed
imadnyc wants to merge 1 commit intozeroclaw-labs:masterfrom
Closed
feat(matrix): add multi-room support#3224imadnyc wants to merge 1 commit intozeroclaw-labs:masterfrom
imadnyc wants to merge 1 commit intozeroclaw-labs:masterfrom
Conversation
Enable a single Matrix bot instance to respond in multiple rooms: - Disable the room_id filter so messages from all joined rooms are processed - Embed room_id in reply_target as "user||room_id" for routing replies - Include room_id in channel field for per-room conversation isolation - Extract room_id from recipient in send() for correct message routing The configured room_id still serves as a fallback for direct sends without a "||" separator in the recipient. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
theonlyhennygod
approved these changes
Mar 11, 2026
Collaborator
theonlyhennygod
left a comment
There was a problem hiding this comment.
Approved for merge
Collaborator
|
Closing in favor of new PR with conflict resolution |
theonlyhennygod
added a commit
that referenced
this pull request
Mar 11, 2026
Enable a single Matrix bot instance to respond in multiple rooms: - Disable the room_id filter so messages from all joined rooms are processed - Embed room_id in reply_target as "user||room_id" for routing replies - Include room_id in channel field for per-room conversation isolation - Extract room_id from recipient in send() for correct message routing The configured room_id still serves as a fallback for direct sends without a "||" separator in the recipient. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
sghael
pushed a commit
to sghael/zeroclaw
that referenced
this pull request
Mar 13, 2026
…abs#3224) PR zeroclaw-labs#3224 (f0f0f80, "feat(matrix): add multi-room support") changed the channel name format in matrix.rs from "matrix" to "matrix:!roomId", but the channel lookup in mod.rs still does an exact match against channels_by_name, which is keyed by Channel::name() (returns "matrix"). This mismatch causes target_channel to always resolve to None for Matrix messages, silently dropping all replies. Fix: fall back to a prefix match on the base channel name (before ':') when the exact lookup fails. This preserves multi-room conversation isolation while correctly routing replies to the originating channel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bglusman
pushed a commit
to bglusman/zeroclaw
that referenced
this pull request
Mar 15, 2026
…abs#3224) PR zeroclaw-labs#3224 (f0f0f80, "feat(matrix): add multi-room support") changed the channel name format in matrix.rs from "matrix" to "matrix:!roomId", but the channel lookup in mod.rs still does an exact match against channels_by_name, which is keyed by Channel::name() (returns "matrix"). This mismatch causes target_channel to always resolve to None for Matrix messages, silently dropping all replies. Fix: fall back to a prefix match on the base channel name (before ':') when the exact lookup fails. This preserves multi-room conversation isolation while correctly routing replies to the originating channel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lantrinh1999
pushed a commit
to lantrinh1999/zeroclaw-1
that referenced
this pull request
Mar 18, 2026
Enable a single Matrix bot instance to respond in multiple rooms: - Disable the room_id filter so messages from all joined rooms are processed - Embed room_id in reply_target as "user||room_id" for routing replies - Include room_id in channel field for per-room conversation isolation - Extract room_id from recipient in send() for correct message routing The configured room_id still serves as a fallback for direct sends without a "||" separator in the recipient. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
lantrinh1999
pushed a commit
to lantrinh1999/zeroclaw-1
that referenced
this pull request
Mar 18, 2026
…abs#3224) (zeroclaw-labs#3378) * fix(channel): resolve multi-room reply routing regression (zeroclaw-labs#3224) PR zeroclaw-labs#3224 (9bddd43, "feat(matrix): add multi-room support") changed the channel name format in matrix.rs from "matrix" to "matrix:!roomId", but the channel lookup in mod.rs still does an exact match against channels_by_name, which is keyed by Channel::name() (returns "matrix"). This mismatch causes target_channel to always resolve to None for Matrix messages, silently dropping all replies. Fix: fall back to a prefix match on the base channel name (before ':') when the exact lookup fails. This preserves multi-room conversation isolation while correctly routing replies to the originating channel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: apply cargo fmt to channel routing fix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Sandeep (Claude) <sghael+claude@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
PlebCoder
pushed a commit
to PlebCoder/zeroclaw
that referenced
this pull request
Mar 19, 2026
Enable a single Matrix bot instance to respond in multiple rooms: - Disable the room_id filter so messages from all joined rooms are processed - Embed room_id in reply_target as "user||room_id" for routing replies - Include room_id in channel field for per-room conversation isolation - Extract room_id from recipient in send() for correct message routing The configured room_id still serves as a fallback for direct sends without a "||" separator in the recipient. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
webhive
pushed a commit
to webhive/zeroclaw
that referenced
this pull request
Mar 24, 2026
…abs#3224) (zeroclaw-labs#3378) * fix(channel): resolve multi-room reply routing regression (zeroclaw-labs#3224) PR zeroclaw-labs#3224 (f0f0f80, "feat(matrix): add multi-room support") changed the channel name format in matrix.rs from "matrix" to "matrix:!roomId", but the channel lookup in mod.rs still does an exact match against channels_by_name, which is keyed by Channel::name() (returns "matrix"). This mismatch causes target_channel to always resolve to None for Matrix messages, silently dropping all replies. Fix: fall back to a prefix match on the base channel name (before ':') when the exact lookup fails. This preserves multi-room conversation isolation while correctly routing replies to the originating channel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: apply cargo fmt to channel routing fix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Sandeep (Claude) <sghael+claude@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
listen()so messages from all joined rooms are processedreply_targetasuser||room_idfor routing replies back to the correct roomchannelfield (e.g.matrix:\!room_id) for per-room conversation isolationsend()for correct message routing; falls back to configured room_id for direct sendsDetails
This enables a single Matrix bot instance to respond in multiple rooms without needing separate channel configurations per room. The configured
room_idstill serves as a fallback when the recipient does not contain a||separator.Test plan
||in recipient still use the configured room🤖 Generated with Claude Code