feat(matrixbot): remove the auto-invite welcome flow entirely
Lint / JS (eslint) (push) Successful in 1m16s
Lint / Python (ruff) (push) Successful in 6s
Lint / Python deps (pip-audit) (push) Successful in 1m1s
Lint / Secret scan (gitleaks) (push) Successful in 7s
Lint / Shell (shellcheck) (push) Successful in 16s

Joining the Lotus Guild Space (join_rule: public) triggered a welcome DM;
reacting to it made the bot invite that user into a fixed room list. Now
that #general is published to the public room directory, any stranger can
join the Space and trigger this.

The room list excluded the invite-only rooms, but it included Voice, whose
join rule is `knock`. An invite bypasses a knock gate, so a stranger could
skip the approval step that rule exists to enforce.

Removes welcome.py, the Space-join watcher in Callbacks.member, both
welcome-reaction hooks, and the admin `cleanwelcome` command. The bot no
longer issues invites automatically anywhere. The PL50+ `invite` and
`inviteall` commands are untouched: those are deliberate admin actions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-16 15:46:36 -04:00
co-authored by Claude Opus 5
parent 9e5d3ec83d
commit fb933b0b13
4 changed files with 9 additions and 212 deletions
-3
View File
@@ -27,7 +27,6 @@ from config import (
)
from callbacks import Callbacks
from utils import setup_logging
from welcome import log_ready as _welcome_log_ready
logger = setup_logging(LOG_LEVEL)
@@ -188,8 +187,6 @@ async def main():
# Trust devices after initial sync loads the device store
await trust_devices(client)
_welcome_log_ready()
logger.info("Bot ready as %s — listening for commands", MATRIX_USER_ID)
# Run sync_forever in a task so we can cancel on shutdown