access_token -> api.token
This commit is contained in:
parent
a95a3e274f
commit
a81b8ba4d3
1 changed files with 2 additions and 2 deletions
|
|
@ -412,7 +412,7 @@ async def main():
|
||||||
client.crypto = OlmMachine(client, crypto_store, state_store)
|
client.crypto = OlmMachine(client, crypto_store, state_store)
|
||||||
|
|
||||||
# Authenticate if access token is missing
|
# Authenticate if access token is missing
|
||||||
if not client.access_token:
|
if not client.api.token:
|
||||||
log.info("Logging in to Matrix homeserver...")
|
log.info("Logging in to Matrix homeserver...")
|
||||||
await client.login(
|
await client.login(
|
||||||
password=MATRIX_BOT_PASSWORD,
|
password=MATRIX_BOT_PASSWORD,
|
||||||
|
|
@ -425,7 +425,7 @@ async def main():
|
||||||
os.makedirs(session_dir, exist_ok=True)
|
os.makedirs(session_dir, exist_ok=True)
|
||||||
with open(SESSION_FILE, "w") as f:
|
with open(SESSION_FILE, "w") as f:
|
||||||
json.dump({
|
json.dump({
|
||||||
"access_token": client.access_token,
|
"access_token": client.api.token,
|
||||||
"device_id": client.device_id
|
"device_id": client.device_id
|
||||||
}, f)
|
}, f)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue