crypto: Update the rust-sdk branch we're using

This commit is contained in:
Damir Jelić 2021-04-20 14:32:43 +02:00
parent 8bfb7a6e0c
commit c5173dde71
2 changed files with 15 additions and 7 deletions

View File

@ -23,11 +23,11 @@ features = ["lax_deserialize"]
[dependencies.matrix-sdk-common]
git = "https://github.com/matrix-org/matrix-rust-sdk/"
branch = "encryption-info"
branch = "corroded-android"
[dependencies.matrix-sdk-crypto]
git = "https://github.com/matrix-org/matrix-rust-sdk/"
branch = "encryption-info"
branch = "corroded-android"
features = ["sled_cryptostore"]
[dependencies.tokio]

View File

@ -20,7 +20,7 @@ use matrix_sdk_common::{
events::{room::encrypted::EncryptedEventContent, AnyMessageEventContent, EventContent},
identifiers::{DeviceKeyAlgorithm, RoomId, UserId},
uuid::Uuid,
UInt,
IncomingResponse, UInt,
};
use matrix_sdk_crypto::{
@ -168,10 +168,18 @@ impl OlmMachine {
let response = response_from_string(&response_body);
let response: OwnedResponse = match request_type {
RequestType::KeysUpload => KeysUploadResponse::try_from(response).map(Into::into),
RequestType::KeysQuery => KeysQueryResponse::try_from(response).map(Into::into),
RequestType::ToDevice => ToDeviceResponse::try_from(response).map(Into::into),
RequestType::KeysClaim => KeysClaimResponse::try_from(response).map(Into::into),
RequestType::KeysUpload => {
KeysUploadResponse::try_from_http_response(response).map(Into::into)
}
RequestType::KeysQuery => {
KeysQueryResponse::try_from_http_response(response).map(Into::into)
}
RequestType::ToDevice => {
ToDeviceResponse::try_from_http_response(response).map(Into::into)
}
RequestType::KeysClaim => {
KeysClaimResponse::try_from_http_response(response).map(Into::into)
}
}
.expect("Can't convert json string to response");