rust: Bump the sdk version
This updates the rust-sdk to support fallback keys, note that fallback keys are not yet uploaded, they just can be used when downloaded and info about the fallback keys coming from a sync can be passed to the rust side.
This commit is contained in:
parent
5109f10833
commit
ee017b7302
@ -309,7 +309,9 @@ internal class OlmMachine(
|
|||||||
MoshiProvider.providesMoshi().adapter(ToDeviceSyncResponse::class.java)
|
MoshiProvider.providesMoshi().adapter(ToDeviceSyncResponse::class.java)
|
||||||
val events = adapter.toJson(toDevice ?: ToDeviceSyncResponse())!!
|
val events = adapter.toJson(toDevice ?: ToDeviceSyncResponse())!!
|
||||||
|
|
||||||
adapter.fromJson(inner.receiveSyncChanges(events, devices, counts)) ?: ToDeviceSyncResponse()
|
// TODO once our sync response type parses the unused fallback key
|
||||||
|
// field pass in the list of unused fallback keys here
|
||||||
|
adapter.fromJson(inner.receiveSyncChanges(events, devices, counts, unusedFallbackKeys = null)) ?: ToDeviceSyncResponse()
|
||||||
}
|
}
|
||||||
|
|
||||||
// We may get cross signing keys over a to-device event, update our listeners.
|
// We may get cross signing keys over a to-device event, update our listeners.
|
||||||
|
@ -29,11 +29,11 @@ features = ["lax_deserialize"]
|
|||||||
|
|
||||||
[dependencies.matrix-sdk-common]
|
[dependencies.matrix-sdk-common]
|
||||||
git = "https://github.com/matrix-org/matrix-rust-sdk/"
|
git = "https://github.com/matrix-org/matrix-rust-sdk/"
|
||||||
rev = "8494f105837af824f4637c05e9e01b0854d7109b"
|
rev = "009ead2eeaf365e1fb0f790557f20d4eaf6874ae"
|
||||||
|
|
||||||
[dependencies.matrix-sdk-crypto]
|
[dependencies.matrix-sdk-crypto]
|
||||||
git = "https://github.com/matrix-org/matrix-rust-sdk/"
|
git = "https://github.com/matrix-org/matrix-rust-sdk/"
|
||||||
rev = "8494f105837af824f4637c05e9e01b0854d7109b"
|
rev = "009ead2eeaf365e1fb0f790557f20d4eaf6874ae"
|
||||||
features = ["sled_cryptostore", "qrcode", "backups_v1"]
|
features = ["sled_cryptostore", "qrcode", "backups_v1"]
|
||||||
|
|
||||||
[dependencies.tokio]
|
[dependencies.tokio]
|
||||||
@ -43,7 +43,7 @@ features = ["rt-multi-thread"]
|
|||||||
|
|
||||||
[dependencies.ruma]
|
[dependencies.ruma]
|
||||||
git = "https://github.com/ruma/ruma"
|
git = "https://github.com/ruma/ruma"
|
||||||
rev = "6c4892664"
|
rev = "fdbc4d6d1dd273c8a6ac95b329943ed8c68df70d"
|
||||||
features = ["client-api-c"]
|
features = ["client-api-c"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
@ -344,6 +344,7 @@ impl OlmMachine {
|
|||||||
events: &str,
|
events: &str,
|
||||||
device_changes: DeviceLists,
|
device_changes: DeviceLists,
|
||||||
key_counts: HashMap<String, i32>,
|
key_counts: HashMap<String, i32>,
|
||||||
|
unused_fallback_keys: Option<Vec<String>>,
|
||||||
) -> Result<String, CryptoStoreError> {
|
) -> Result<String, CryptoStoreError> {
|
||||||
let events: ToDevice = serde_json::from_str(events)?;
|
let events: ToDevice = serde_json::from_str(events)?;
|
||||||
let device_changes: RumaDeviceLists = device_changes.into();
|
let device_changes: RumaDeviceLists = device_changes.into();
|
||||||
@ -359,10 +360,14 @@ impl OlmMachine {
|
|||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
let unused_fallback_keys: Option<Vec<DeviceKeyAlgorithm>> =
|
||||||
|
unused_fallback_keys.map(|u| u.into_iter().map(DeviceKeyAlgorithm::from).collect());
|
||||||
|
|
||||||
let events = self.runtime.block_on(self.inner.receive_sync_changes(
|
let events = self.runtime.block_on(self.inner.receive_sync_changes(
|
||||||
events,
|
events,
|
||||||
&device_changes,
|
&device_changes,
|
||||||
&key_counts,
|
&key_counts,
|
||||||
|
unused_fallback_keys.as_deref(),
|
||||||
))?;
|
))?;
|
||||||
|
|
||||||
Ok(serde_json::to_string(&events)?)
|
Ok(serde_json::to_string(&events)?)
|
||||||
|
@ -244,7 +244,8 @@ interface OlmMachine {
|
|||||||
[Throws=CryptoStoreError]
|
[Throws=CryptoStoreError]
|
||||||
string receive_sync_changes([ByRef] string events,
|
string receive_sync_changes([ByRef] string events,
|
||||||
DeviceLists device_changes,
|
DeviceLists device_changes,
|
||||||
record<DOMString, i32> key_counts);
|
record<DOMString, i32> key_counts,
|
||||||
|
sequence<string>? unused_fallback_keys);
|
||||||
[Throws=CryptoStoreError]
|
[Throws=CryptoStoreError]
|
||||||
sequence<Request> outgoing_requests();
|
sequence<Request> outgoing_requests();
|
||||||
[Throws=CryptoStoreError]
|
[Throws=CryptoStoreError]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user