mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
client: Use the nio provided method to find a SAS object.
This commit is contained in:
parent
46ff19ea3c
commit
5ef5551977
@ -151,19 +151,15 @@ class PanClient(AsyncClient):
|
||||
user_id = message.user_id
|
||||
device_id = message.device_id
|
||||
|
||||
sas = None
|
||||
|
||||
for s in self.key_verifications.values():
|
||||
device = s.other_olm_device
|
||||
if device.user_id == user_id and device.id == device_id:
|
||||
sas = s
|
||||
break
|
||||
sas = self.get_active_sas(user_id, device_id)
|
||||
|
||||
if not sas:
|
||||
self.send_info("No such verification process found.")
|
||||
return
|
||||
|
||||
await self.accept_short_auth_string(sas.transaction_id)
|
||||
|
||||
device = sas.other_olm_device
|
||||
if sas.verified:
|
||||
await self.send_info(f"Device {device.id} of user {device.user_id}"
|
||||
f" succesfully verified.")
|
||||
|
Loading…
Reference in New Issue
Block a user