Skip to content

Commit

Permalink
update to latest version of vodozemac branch
Browse files Browse the repository at this point in the history
  • Loading branch information
uhoreg committed Jan 9, 2025
1 parent ecff934 commit b94bebb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions crates/matrix-sdk-crypto/src/olm/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,15 @@ impl Account {
}

pub(crate) fn dehydrate(&self, pickle_key: &[u8; 32]) -> Raw<DehydratedDeviceData> {
let (device_pickle, nonce) = self
let dehydration_result = self
.inner
.to_dehydrated_device(pickle_key)
.expect("We should be able to convert a freshly created Account into a libolm pickle");

let data = DehydratedDeviceData::V2(DehydratedDeviceV2::new(device_pickle, nonce));
let data = DehydratedDeviceData::V2(DehydratedDeviceV2::new(
dehydration_result.ciphertext,
dehydration_result.nonce,
));
Raw::from_json(to_raw_value(&data).expect("Couldn't serialize our dehydrated device data"))
}

Expand Down

0 comments on commit b94bebb

Please sign in to comment.