* 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
* update join and leave internal api.
* rename onMembershipUpdate and triggerCallMembershipEventUpdate to onMembershipsUpdate
This makes it more clear that we do not talk about our own membership but all memberships in the session
* cleanup MembershipManager
- add comments and interface how to test this class.
- sort methods by public/private
- make triggerCallMembershipEventUpdate private
* docstrings for getFocusInUse and getActiveFocus
* simplify tests and make them only use MembershipManagerInterface methods.
This allows to exchange the membershipManager with a different implementation.
* convert interface to abstract class.
* review (implement interface, make interface internal, dont change public api.)
* Make the interface an actual interface.
The actual constructor of the class now contains the `Pick` to define what it needs from the client.
* move update condition into MembershipManager
* renaming public api
* Update src/matrixrtc/MatrixRTCSession.ts
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
* Update src/matrixrtc/MatrixRTCSession.ts
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
---------
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
* split joinConfig
- myMembership related properties get moved into its own interface
* Add MyMembershipManager
* Remove methods and functions that are from MatrixRTCSession (they now live in MyMembershipManager)
* Refactor MatrixRTCSession to use myMembershipManager
* fix tests
* review
* get rid of more memberhsip manager usage in tests
* review - fix tests using private membershipManager props
* fix circular import
* Fix issue with sentinels being incorrect on m.room.member events
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify change
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* remove all legacy call related code and adjust tests.
We actually had a bit of tests just for legacy and not for session events. All those tests got ported over so we do not remove any tests.
* dont adjust tests but remove legacy tests
* Remove deprecated CallMembership.getLocalExpiry()
* Remove references to legacy in test case names
* Clean up SessionMembershipData tsdoc
* Remove CallMembership.expires
* Use correct expire duration.
* make expiration methods not return optional values and update docstring
* add docs to `SessionMembershipData`
* Add new tests for session type member events that before only existed for legacy member events.
This reverts commit 795a3cffb61d672941c49e8139eb1d7b15c87d73.
* remove code we do not need yet.
* Cleanup
---------
Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
* remove all legacy call related code and adjust tests.
We actually had a bit of tests just for legacy and not for session events. All those tests got ported over so we do not remove any tests.
* dont adjust tests but remove legacy tests
* Remove deprecated CallMembership.getLocalExpiry()
* Remove references to legacy in test case names
* Clean up SessionMembershipData tsdoc
* Remove CallMembership.expires
* Use correct expire duration.
* make expiration methods not return optional values and update docstring
* add docs to `SessionMembershipData`
* Use `MSC4143` (instaed of `non-legacy`) wording in comment
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
* Incorporate feedback from review
* Fix test name
---------
Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>