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)
|
||||
|
||||
# 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):
|
||||
|
|
Loading…
Reference in New Issue