diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index 2067d1f4..703dbafa 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -19,9 +19,7 @@ instant = { version = "0.1.7", features = ["wasm-bindgen", "now"] } js_int = "0.1.9" [dependencies.ruma] -version = "0.0.1" -git = "https://github.com/ruma/ruma" -rev = "1a4e9aa20abff4786dbb91a19fb72c1dfa4410a7" +version = "0.0.2" features = ["client-api", "unstable-pre-spec"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies] diff --git a/matrix_sdk_common/src/lib.rs b/matrix_sdk_common/src/lib.rs index 13655d0a..c7a83c90 100644 --- a/matrix_sdk_common/src/lib.rs +++ b/matrix_sdk_common/src/lib.rs @@ -1,13 +1,14 @@ pub use assign::assign; pub use instant; -pub use js_int; pub use ruma::{ api::{ client as api, error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError}, AuthScheme, EndpointError, OutgoingRequest, }, - directory, encryption, events, identifiers, presence, push, + directory, encryption, events, + events::exports::js_int, + identifiers, presence, push, serde::{CanonicalJsonValue, Raw}, thirdparty, Outgoing, }; diff --git a/matrix_sdk_crypto/src/store/sqlite.rs b/matrix_sdk_crypto/src/store/sqlite.rs index 8b843c49..27d3cb06 100644 --- a/matrix_sdk_crypto/src/store/sqlite.rs +++ b/matrix_sdk_crypto/src/store/sqlite.rs @@ -664,7 +664,7 @@ impl SqliteStore { let claimed_keys: BTreeMap = key_rows .into_iter() .filter_map(|row| { - let algorithm = row.0.parse::().ok()?; + let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?; let key = row.1; Some((algorithm, key)) @@ -872,7 +872,7 @@ impl SqliteStore { let keys: BTreeMap = key_rows .into_iter() .filter_map(|row| { - let algorithm = row.0.parse::().ok()?; + let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?; let key = row.1; Some((DeviceKeyId::from_parts(algorithm, &device_id), key)) @@ -896,7 +896,7 @@ impl SqliteStore { continue; }; - let key_algorithm = if let Ok(k) = row.1.parse::() { + let key_algorithm = if let Ok(k) = DeviceKeyAlgorithm::try_from(row.1) { k } else { continue;