From 81b640ba74f7bea1f10f2563e2303b5f70df0c09 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Mon, 12 Oct 2026 09:01:22 -0600 Subject: [PATCH] matrix-mxid: return invite_sent so the dashboard can confirm the invite is on its way --- app/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 22058b6..12183d6 100644 --- a/app/main.py +++ b/app/main.py @@ -2677,12 +2677,16 @@ async def broker_set_matrix_mxid(request: Request): set_member_matrix_mxid(email, mxid) # Invite the new account into the Space immediately (best-effort; the daily # sync will also pick it up). Clear = no invite (just removes the mapping). + invite_sent = True if mxid: try: await sync_matrix_space() except Exception as e: logger.warning("matrix-mxid: immediate invite failed: %s", e) - return {"status": "saved", "matrix_mxid": mxid} + invite_sent = False + # invite_sent=False tells the dashboard the nightly sync will retry; the + # mapping is saved either way, so the member gets a confident confirmation. + return {"status": "saved", "matrix_mxid": mxid, "invite_sent": invite_sent} async def broker_get_usage(email: str, days: int = 0) -> dict: