Add support for device dehydration v2 - #12316
Conversation
Correct, because even just launching the app would hit like 30% overall test coverage without any useful assertions |
| * Dehydration can only be enabled if encryption is available, and the crypto | ||
| * backend supports dehydration. |
There was a problem hiding this comment.
| * Dehydration can only be enabled if encryption is available, and the crypto | |
| * backend supports dehydration. | |
| * Note that this doesn't necessarily mean that device dehydration has been initialised | |
| * (yet) on this client; rather, it means that the server supports it, the crypto backend | |
| * supports it, and the application configuration suggests that it *should* be | |
| * initialised on this device. |
|
|
||
| await initializeDehydration(); |
There was a problem hiding this comment.
Ok. I suggest you make an issue about it if you don't expect to have it done in very short order.
|
As @t3chguy implies: I'm afraid you'll need to write jest tests to get the coverage up. Hopefully it should be pretty easy. |
|
Yup, I'll try to write some stuff to make SonarCloud happy |
|
|
||
| await initializeDehydration(); |
richvdh
left a comment
There was a problem hiding this comment.
LGTM. The tests look very comprehensive!
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
|
This seems to have bypassed labs but relies on experimental MSC implementations, this is quite unexpected |
It has to be enabled on the server by editing the |
Sure, that's why we support setting labs flags in config.json - normally the product policy is to not release things relying on unstable APIs without product sign off |
Rehydrates/dehydrates device if dehydration is enabled in
.well-knownfile (or if there is a dehydration key in SSSS). (Currently, js-sdk only supports dehydration when using Rust crypto.)Dehydrated devices are hidden or displayed specially when they are cross-signed, and if there is only one. Otherwise, they are displayed as normal devices.
Checklist
public/exportedsymbols have accurate TSDoc documentation.