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: