fix: route all Matrix configs through build_matrix_messenger#168
Merged
fix: route all Matrix configs through build_matrix_messenger#168
Conversation
Remove the 'matrix' arm from generic_messenger_config that intercepted password-based Matrix configs and routed them through GenericMessenger. This caused state_dir, allowed_chats, and dm_config setup to be silently skipped for password-auth Matrix users. Now all Matrix configs (both access_token and password) go through build_matrix_messenger, which already handles both auth modes and correctly applies state_dir, allowed_chats, and dm_config. Fixes Devin Review finding on PR #167. Co-Authored-By: Erica Stith <rexlunae@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
Removes the
"matrix" if config.access_token.is_none()arm fromgeneric_messenger_config, which was intercepting password-based Matrix configurations and routing them throughGenericMessenger. This causedbuild_matrix_messenger— and its setup ofstate_dir,allowed_chats, anddm_config— to be silently skipped for password-auth Matrix users.After this change, all Matrix configs (both access_token and password-based) go through
build_matrix_messenger, which already handles both auth modes (lines 360-378 in the current file).This addresses the unresolved Devin Review finding on PR #167.
Review & Testing Checklist for Human
MatrixMessenger(password path) is a full replacement forGenericMessengerwrappingchat_system_config::MatrixConfig: The old code created aGenericMessengerfor password-based Matrix; the new code creates aMatrixMessengerviabuild_matrix_messenger. Confirm there are no behaviors inGenericMessengerthatMatrixMessengerlacks (e.g., reconnection logic, error handling differences).password(noaccess_token) and verify: (1) login succeeds, (2) sync token persists across restarts, (3)allowed_chatsfiltering works, (4)dm_configis respected.build_matrix_messenger.Notes
rustyclaw-corecrate compiles cleanly with--features matrix. The two warnings present (unused_importsinssh.rs,unused_variablesinmod.rs) are pre-existing and unrelated.Link to Devin session: https://app.devin.ai/sessions/0599369f847f4741a17b8026ac897dc4
Requested by: @rexlunae