mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
daemon: Automatically verify new devices.
This is a stopgap before some UI is exposed to let the user verify devices.
This commit is contained in:
parent
79aecc1826
commit
a5930e449c
@ -219,7 +219,19 @@ class ProxyDaemon:
|
||||
await client.keys_upload()
|
||||
|
||||
if client.should_query_keys:
|
||||
await client.keys_query()
|
||||
key_query_response = await client.keys_query()
|
||||
|
||||
# Verify new devices automatically for now.
|
||||
if isinstance(key_query_response, KeysQueryResponse):
|
||||
for user_id, device_dict in key_query_response.changed.items():
|
||||
for device in device_dict.values():
|
||||
if device.deleted:
|
||||
continue
|
||||
|
||||
print("Automatically verifying device {}".format(
|
||||
device.id
|
||||
))
|
||||
client.verify_device(device)
|
||||
|
||||
json_response = await response.transport_response.json()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user