mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-24 16:48:52 -04:00
refactor(crypto): Simplify the Curve25519 check when fetching a device
Co-authored-by: Jonas Platte <jplatte@matrix.org>
This commit is contained in:
@@ -379,7 +379,7 @@ impl Store {
|
||||
) -> Result<Option<Device>> {
|
||||
self.get_user_devices(user_id)
|
||||
.await
|
||||
.map(|d| d.devices().find(|d| d.curve25519_key().map_or(false, |k| k == curve_key)))
|
||||
.map(|d| d.devices().find(|d| d.curve25519_key() == Some(curve_key)))
|
||||
}
|
||||
|
||||
/// Get all devices associated with the given `user_id`
|
||||
|
||||
Reference in New Issue
Block a user