diff --git a/backend/matrix_intake/bot.py b/backend/matrix_intake/bot.py index bd07918..483fa8e 100644 --- a/backend/matrix_intake/bot.py +++ b/backend/matrix_intake/bot.py @@ -275,6 +275,12 @@ async def main(): print(f"matrix-intake: listening as {who.user_id} in room {intake_room}", flush=True) tasks = [asyncio.create_task(client.sync_forever(timeout=30000))] if review_room: + # "Invited" isn't "joined" — the bot must join before it can post cards (room_send to a + # room we're only invited to fails M_FORBIDDEN). Idempotent if already a member. + try: + await client.join(review_room) + except Exception as exc: + print(f"matrix-intake: could not join review room {review_room}: {exc}", flush=True) tasks.append(asyncio.create_task(poll_email_proposals())) print(f"matrix-intake: reviewing email proposals in room {review_room} (every {EMAIL_POLL_SEC}s)", flush=True) try: