feat(encryption): Add high-level API for Device Dehydration (MSC3814)#6273
Open
thmasq wants to merge 1 commit intomatrix-org:mainfrom
Open
feat(encryption): Add high-level API for Device Dehydration (MSC3814)#6273thmasq wants to merge 1 commit intomatrix-org:mainfrom
thmasq wants to merge 1 commit intomatrix-org:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6273 +/- ##
=======================================
Coverage 89.90% 89.90%
=======================================
Files 373 374 +1
Lines 102570 102613 +43
Branches 102570 102613 +43
=======================================
+ Hits 92219 92259 +40
+ Misses 6790 6787 -3
- Partials 3561 3567 +6 ☔ View full report in Codecov by Sentry. |
This introduces a high-level interface for Device Dehydration, which allows clients to proactively create a virtual device on the server to receive E2EE keys while the primary client is offline. The new functionality is exposed via `client.encryption().dehydrated_devices()` and provides `upload` and `rehydrate_and_absorb` methods. All new additions are gated behind the `unstable-msc3814` cargo feature. Signed-off-by: Thomas Q <thomasqsa@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces a high-level interface for Device Dehydration, which allows clients to proactively create a virtual device on the server to receive E2EE keys while the primary client is offline. Currently the only way to use this is with the raw bindings of the ruma crate.
The new functionality is exposed via
client.encryption().dehydrated_devices()and providesuploadandrehydrate_and_absorbmethods. All new additions are gated behind theunstable-msc3814cargo feature.As I'm unfamiliar with wiremock, I had some AI assistance when making the integration tests. I'm currently running them like the following:
cargo test -p matrix-sdk --test integration --features unstable-msc3814,testing dehydrated_devicesCHANGELOG.mdfiles.Signed-off-by: Thomas Q thomasqsa@gmail.com