Merge branch 'master' into new-state-store
commit
108d4ebffe
|
@ -19,9 +19,7 @@ instant = { version = "0.1.7", features = ["wasm-bindgen", "now"] }
|
||||||
js_int = "0.1.9"
|
js_int = "0.1.9"
|
||||||
|
|
||||||
[dependencies.ruma]
|
[dependencies.ruma]
|
||||||
version = "0.0.1"
|
version = "0.0.2"
|
||||||
git = "https://github.com/ruma/ruma"
|
|
||||||
rev = "1a4e9aa20abff4786dbb91a19fb72c1dfa4410a7"
|
|
||||||
features = ["client-api", "unstable-pre-spec"]
|
features = ["client-api", "unstable-pre-spec"]
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
pub use assign::assign;
|
pub use assign::assign;
|
||||||
pub use instant;
|
pub use instant;
|
||||||
pub use js_int;
|
|
||||||
pub use ruma::{
|
pub use ruma::{
|
||||||
api::{
|
api::{
|
||||||
client as api,
|
client as api,
|
||||||
error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError},
|
error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError},
|
||||||
AuthScheme, EndpointError, OutgoingRequest,
|
AuthScheme, EndpointError, OutgoingRequest,
|
||||||
},
|
},
|
||||||
directory, encryption, events, identifiers, presence, push,
|
directory, encryption, events,
|
||||||
|
events::exports::js_int,
|
||||||
|
identifiers, presence, push,
|
||||||
serde::{CanonicalJsonValue, Raw},
|
serde::{CanonicalJsonValue, Raw},
|
||||||
thirdparty, Outgoing,
|
thirdparty, Outgoing,
|
||||||
};
|
};
|
||||||
|
|
|
@ -664,7 +664,7 @@ impl SqliteStore {
|
||||||
let claimed_keys: BTreeMap<DeviceKeyAlgorithm, String> = key_rows
|
let claimed_keys: BTreeMap<DeviceKeyAlgorithm, String> = key_rows
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|row| {
|
.filter_map(|row| {
|
||||||
let algorithm = row.0.parse::<DeviceKeyAlgorithm>().ok()?;
|
let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?;
|
||||||
let key = row.1;
|
let key = row.1;
|
||||||
|
|
||||||
Some((algorithm, key))
|
Some((algorithm, key))
|
||||||
|
@ -872,7 +872,7 @@ impl SqliteStore {
|
||||||
let keys: BTreeMap<DeviceKeyId, String> = key_rows
|
let keys: BTreeMap<DeviceKeyId, String> = key_rows
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|row| {
|
.filter_map(|row| {
|
||||||
let algorithm = row.0.parse::<DeviceKeyAlgorithm>().ok()?;
|
let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?;
|
||||||
let key = row.1;
|
let key = row.1;
|
||||||
|
|
||||||
Some((DeviceKeyId::from_parts(algorithm, &device_id), key))
|
Some((DeviceKeyId::from_parts(algorithm, &device_id), key))
|
||||||
|
@ -896,7 +896,7 @@ impl SqliteStore {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
let key_algorithm = if let Ok(k) = row.1.parse::<DeviceKeyAlgorithm>() {
|
let key_algorithm = if let Ok(k) = DeviceKeyAlgorithm::try_from(row.1) {
|
||||||
k
|
k
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue