dont logout other devices
This commit is contained in:
parent
a5cabe767d
commit
706d8472dd
18
main.py
18
main.py
|
@ -124,15 +124,15 @@ async def main():
|
||||||
time.sleep(1.5)
|
time.sleep(1.5)
|
||||||
|
|
||||||
# Log out old devices to keep the session clean
|
# Log out old devices to keep the session clean
|
||||||
devices = list((await client.devices()).devices)
|
# devices = list((await client.devices()).devices)
|
||||||
device_list = [x.id for x in devices]
|
# device_list = [x.id for x in devices]
|
||||||
if device_id in device_list:
|
# if device_id in device_list:
|
||||||
device_list.remove(device_id)
|
# device_list.remove(device_id)
|
||||||
x = await client.delete_devices(device_list, {
|
# x = await client.delete_devices(device_list, {
|
||||||
"type": "m.login.password",
|
# "type": "m.login.password",
|
||||||
"user": config_data['bot_auth']['username'],
|
# "user": config_data['bot_auth']['username'],
|
||||||
"password": config_data['bot_auth']['password']
|
# "password": config_data['bot_auth']['password']
|
||||||
})
|
# })
|
||||||
|
|
||||||
await client.sync_forever(timeout=10000, full_state=True)
|
await client.sync_forever(timeout=10000, full_state=True)
|
||||||
except (ClientConnectionError, ServerDisconnectedError):
|
except (ClientConnectionError, ServerDisconnectedError):
|
||||||
|
|
Loading…
Reference in New Issue