From 106b5637485ab8cfda69633bc1d999093e474722 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Wed, 14 Oct 2026 16:40:35 -0600 Subject: [PATCH] sync: invite members to MATRIX_EXTRA_ROOMS too (restricted rooms aren't federation-discoverable until joined) --- app/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/main.py b/app/main.py index d28a1c1..71b5e86 100644 --- a/app/main.py +++ b/app/main.py @@ -200,6 +200,11 @@ MATRIX_HOMESERVER = os.environ.get("MATRIX_HOMESERVER", "https://matrix.inferenc MATRIX_BOT_TOKEN = os.environ.get("MATRIX_BOT_TOKEN", "") MATRIX_SPACE_ID = os.environ.get("MATRIX_SPACE_ID", "") MATRIX_GENERAL_ROOM = os.environ.get("MATRIX_GENERAL_ROOM", "") +# Additional member-facing rooms that every member gets invited to (comma-separated +# room IDs). Restricted rooms are NOT discoverable over federation until a member +# has joined (the space hierarchy omits them for remote servers), so new rooms need +# an explicit invite pass — either here or a one-off script. +MATRIX_EXTRA_ROOMS = [r.strip() for r in os.environ.get("MATRIX_EXTRA_ROOMS", "").split(",") if r.strip()] LOOMIO_GROUP_ID = os.environ.get("LOOMIO_GROUP_ID", "") # Operator accounts that must always remain in the Loomio group (never removed # by the remove_absent reconciliation), comma-separated. @@ -934,6 +939,8 @@ async def sync_matrix_space() -> dict: await invite(mxid, MATRIX_SPACE_ID) if MATRIX_GENERAL_ROOM: await invite(mxid, MATRIX_GENERAL_ROOM) + for room in MATRIX_EXTRA_ROOMS: + await invite(mxid, room) invited_count += 1 if invited_count: logger.info("Matrix space invites sent: %s", invited_count)