dont logout other devices

This commit is contained in:
Cyberes 2023-03-18 13:56:45 -06:00
parent a5cabe767d
commit 706d8472dd
1 changed files with 9 additions and 9 deletions

18
main.py
View File

@ -124,15 +124,15 @@ async def main():
time.sleep(1.5)
# Log out old devices to keep the session clean
devices = list((await client.devices()).devices)
device_list = [x.id for x in devices]
if device_id in device_list:
device_list.remove(device_id)
x = await client.delete_devices(device_list, {
"type": "m.login.password",
"user": config_data['bot_auth']['username'],
"password": config_data['bot_auth']['password']
})
# devices = list((await client.devices()).devices)
# device_list = [x.id for x in devices]
# if device_id in device_list:
# device_list.remove(device_id)
# x = await client.delete_devices(device_list, {
# "type": "m.login.password",
# "user": config_data['bot_auth']['username'],
# "password": config_data['bot_auth']['password']
# })
await client.sync_forever(timeout=10000, full_state=True)
except (ClientConnectionError, ServerDisconnectedError):