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: