mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-12-21 02:55:45 -05: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
1 changed files with 13 additions and 1 deletions
|
|
@ -219,7 +219,19 @@ class ProxyDaemon:
|
||||||
await client.keys_upload()
|
await client.keys_upload()
|
||||||
|
|
||||||
if client.should_query_keys:
|
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()
|
json_response = await response.transport_response.json()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue