* Define topic as optional.
* Change isProvided so that types work better.
* allow makeTopicContent and parseTopicContent to handle optional values for plain text
* linting
* Remove usage of optional
* Topic key may only contain legacy key.
* Add tests for other branches.
* feat(dehydrated): Use the dehydrated key cache API
* feat(dehydrated): Add signalling to device dehydration manager
* feat(dehydrated): fix unneeded call getCachedKey
* Upgrade to `matrix-sdk-crypto-wasm` v13.0.0
* review: quick fix and doc
* apply changes from review
* apply changes from review
* fix comment
* add some tests and emit an event on rehydration failure
* factor out event counter into a test util, since it may be useful elsewhere
* adjust test to cover a few more lines
* fix documentation
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* fix missing bracket
* add test for getting the dehydration key from SSSS
---------
Co-authored-by: Hubert Chathi <hubertc@matrix.org>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Add an extra consistency check in `bootstrapCrossSigning`
check that `importCrossSigningKeys` has actually worked
* Update src/rust-crypto/CrossSigningIdentity.ts
* declare type in @types, instead of in source
`MatrixClient.login` has some very unintuitive behaviour where it
stashes the access token, but not the device id, refresh token, etc etc, which
led people to imagine that they had a functional `MatrixClient` when they
didn't. In practice, you have to create a *new* `MatrixClient` given the `LoginResponse`.
As the first step for sorting this out, this deprecates the broken method and
replaces it with one that has sensible behaviour.
* Fix documentation on `CryptoEvent`
`CryptoApi` itself does not emit events (or at least, its public type
information does not allow you to listen for events emitted by CryptoApi).
* fix link
...and renames them, removing the special lowercase and uppercase
versions and exporting the underlying function instead.
Any apps that use these will either need to take the speed hit from
secure random functions and use the new ones, or write their own
insecure versions.
The lowercase and uppercasde verisons were used exactly once each
in element-web and never in js-sdk itself. The underlying function
is very simple and exporting just this gives more flexibility with
fewer exports.
* Distinguish room state and timeline events in embedded clients
This change enables room widget clients to take advantage of the more reliable method of communicating room state over the widget API provided by a recent update to MSC2762.
* Add missing awaits
* Upgrade matrix-widget-api