From 07a1f2ad4e19ec85137910587c255fd55725d7df Mon Sep 17 00:00:00 2001 From: inference-bot Date: Fri, 2 Oct 2026 12:28:39 -0600 Subject: [PATCH] Fix Cloudron users API response shape ({users: [...]}) --- app/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index f9c4f98..a6ea40b 100644 --- a/app/main.py +++ b/app/main.py @@ -895,7 +895,10 @@ async def matrix_member_mxids(client: httpx.AsyncClient): f"{CLOUDRON_API}/api/v1/users", headers=cloudron_headers(), ) - users = {u["email"].lower(): u["username"] for u in r.json()} if r.status_code == 200 else {} + users = ( + {u["email"].lower(): u["username"] for u in r.json().get("users", [])} + if r.status_code == 200 else {} + ) for email in await get_active_member_emails(): username = users.get(email.lower()) if username: