diff --git a/run.py b/run.py index f0bc95f..6ad7189 100644 --- a/run.py +++ b/run.py @@ -1036,7 +1036,7 @@ async def github(request): # which is not represented in the original webhook async def is_user_in_organization(user): token = open("./github_bot_token").read().strip() - async with aiohttp.ClientSession(headers={"Authorization": f"token {token}"}) as session: + async with aiohttp.ClientSession(headers={"Authorization": f"token {token}", "Accept": "application/vnd.github.v3+json"}) as session: await resp = session.get(f"https://api.github.com/orgs/YunoHost-Apps/members/{user}") return resp.status == 204