From e60bc88a2a0b2fd103921ed8d88fb28fc30ed326 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 19 Dec 2024 13:03:47 +0100 Subject: [PATCH] review: update doc --- CHANGELOG.md | 7 +++---- src/dehydrated_devices.rs | 9 ++------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d93eef608..db7f8343f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # UNRELEASED +- Update matrix-rusk-sdk to `512a2d2662f9d`. - Update matrix-rusk-sdk to `e99939db857ca`. - The published package is now a proper dual CommonJS/ESM package. - The WebAssembly module is now loaded using `fetch` on Web platforms, reducing @@ -17,10 +18,8 @@ - Expose new API `DehydratedDevices.getDehydratedDeviceKey`, `DehydratedDevices.saveDehydratedDeviceKey` and `DehydratedDevices.deleteDehydratedDeviceKey` to store/load the dehydrated device pickle key. - This allows client to automatically rotate the dehydrated device to avoid one-time-keys exhaustion and - to_device accumulation. `DehydratedDevices.keysForUpload` and `DehydratedDevices.rehydrate` now use the - `DehydratedDeviceKey` as parameter instead of a raw UInt8Array. - Use `DehydratedDeviceKey::createKeyFromArray` to migrate. + `DehydratedDevices.keysForUpload` and `DehydratedDevices.rehydrate` now use the `DehydratedDeviceKey` as parameter + instead of a raw UInt8Array.Use `DehydratedDeviceKey::createKeyFromArray` to migrate. # matrix-sdk-crypto-wasm v11.0.0 diff --git a/src/dehydrated_devices.rs b/src/dehydrated_devices.rs index 8ee086409..298c292a3 100644 --- a/src/dehydrated_devices.rs +++ b/src/dehydrated_devices.rs @@ -61,7 +61,7 @@ impl From for DehydratedDeviceKey { #[wasm_bindgen] impl DehydratedDevices { - /// Create a new [`DehydratedDevice`] which can be uploaded to the server. + /// Create a new {@link DehydratedDevice} which can be uploaded to the server. #[wasm_bindgen] pub async fn create(&self) -> Result { Ok(self.inner.create().await?.into()) @@ -89,10 +89,8 @@ impl DehydratedDevices { /// Get the cached dehydrated device key if any. /// /// `None` if the key was not previously cached (via - /// [`DehydratedDevices::save_dehydrated_device_key`]). + /// {@link DehydratedDevices.saveDehydratedDeviceKey}). /// - /// Should be used to periodically rotate the dehydrated device to avoid - /// OTK exhaustion and accumulation of to_device messages. #[wasm_bindgen(js_name = "getDehydratedDeviceKey")] pub async fn get_dehydrated_device_key(&self) -> Result, JsError> { let key = self.inner.get_dehydrated_device_pickle_key().await?; @@ -100,9 +98,6 @@ impl DehydratedDevices { } /// Store the dehydrated device key in the crypto store. - /// - /// This is useful if the client wants to periodically rotate dehydrated - /// devices to avoid OTK exhaustion and accumulated to_device problems. #[wasm_bindgen(js_name = "saveDehydratedDeviceKey")] pub async fn save_dehydrated_device_key( &self,