diff --git a/matrix_keycloak_bot.py b/matrix_keycloak_bot.py index b4b8c5f..6464bfd 100644 --- a/matrix_keycloak_bot.py +++ b/matrix_keycloak_bot.py @@ -412,7 +412,7 @@ async def main(): client.crypto = OlmMachine(client, crypto_store, state_store) # Authenticate if access token is missing - if not client.access_token: + if not client.api.token: log.info("Logging in to Matrix homeserver...") await client.login( password=MATRIX_BOT_PASSWORD, @@ -425,7 +425,7 @@ async def main(): os.makedirs(session_dir, exist_ok=True) with open(SESSION_FILE, "w") as f: json.dump({ - "access_token": client.access_token, + "access_token": client.api.token, "device_id": client.device_id }, f)