mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-07-30 06:32:17 +00:00
MatrixAdapter hardcoded `auto_accept_invites: true`, meaning any Matrix-connected instance would blindly join every room it was invited to. This is a security concern for public-facing homeservers — a malicious user could invite the bot into an arbitrary room and interact with the agent without the operator's consent. Changes: - Add `auto_accept_invites: bool` to `MatrixConfig` in openfang-types, with `#[serde(default)]` defaulting to `false`. - Thread the field through `MatrixAdapter::new()` instead of hardcoding. - Wire it in `channel_bridge.rs` from `mx_config.auto_accept_invites`. - Update tests to pass the new parameter. Operators who want the old behaviour can set: ```toml [channels.matrix] auto_accept_invites = true ``` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>