diff --git a/matrix_sdk_crypto/src/device.rs b/matrix_sdk_crypto/src/device.rs index 958510a4..587f0ecc 100644 --- a/matrix_sdk_crypto/src/device.rs +++ b/matrix_sdk_crypto/src/device.rs @@ -38,7 +38,7 @@ use super::{Account, OlmMachine}; use crate::{ error::SignatureError, store::Result as StoreResult, - user_identity::{OwnUserIdentity, UserIdentity}, + user_identity::{OwnUserIdentity, UserIdentities}, verification::VerificationMachine, verify_json, ReadOnlyUserDevices, Sas, }; @@ -62,7 +62,7 @@ pub struct Device { pub(crate) inner: ReadOnlyDevice, pub(crate) verification_machine: VerificationMachine, pub(crate) own_identity: Option, - pub(crate) device_owner_identity: Option, + pub(crate) device_owner_identity: Option, } impl Deref for Device { @@ -103,7 +103,7 @@ pub struct UserDevices { pub(crate) inner: ReadOnlyUserDevices, pub(crate) verification_machine: VerificationMachine, pub(crate) own_identity: Option, - pub(crate) device_owner_identity: Option, + pub(crate) device_owner_identity: Option, } impl UserDevices { diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index 65a53c8d..a65373b9 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -1431,14 +1431,7 @@ impl OlmMachine { .flatten() .map(|i| i.own().cloned()) .flatten(); - let device_owner_identity = self - .store - .get_user_identity(user_id) - .await - .ok() - .flatten() - .map(|i| i.other().cloned()) - .flatten(); + let device_owner_identity = self.store.get_user_identity(user_id).await.ok().flatten(); Some(Device { inner: device, @@ -1482,14 +1475,7 @@ impl OlmMachine { .flatten() .map(|i| i.own().cloned()) .flatten(); - let device_owner_identity = self - .store - .get_user_identity(user_id) - .await - .ok() - .flatten() - .map(|i| i.other().cloned()) - .flatten(); + let device_owner_identity = self.store.get_user_identity(user_id).await.ok().flatten(); Ok(UserDevices { inner: devices,