* Fix stable-suffixed MSC4133 support
It looked for the ".stable" suffixed feature to work out what URL to use but not to see whether the server supported it.
This will only be relevant until the next spec release but may as well fix it.
See also https://github.com/element-hq/element-web/pull/30649
* Fix awaiting
This inverts the check for whether to use hydra semantics to only NOT use
it for known, old room versions and use hydra for everything else, so
rooms with versions we don't know about will use hydra semantics.
This will cause any rooms using old/experiental versions unknown to
the js-sdk to break, but will mean that wehn the next room version
comes out, we'll use hydra for it which is, of course, not a given,
but is way more likely than going back to the old semantics.
The mobile Element clients currently hardcode hydra versions (ie.
as it is without this change, but we expect them to make this same
change soon after the hydra release.
We do NOT expect this to land with the hydra release, but target it for
the release after.
Reverts 1e5054a8ff from https://github.com/matrix-org/matrix-js-sdk/pull/4937
See https://github.com/element-hq/element-meta/issues/2921 for public
discussion.
* Expose the StatusChanged event through the RTCSession
Signed-off-by: Timo K <toger5@hotmail.de>
* add membershipManagerStatus public get field
Signed-off-by: Timo K <toger5@hotmail.de>
* add probably left as a getter
Signed-off-by: Timo K <toger5@hotmail.de>
* add tests for coverage
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Add probablyLeft emission to the MatrixRTCSession
Signed-off-by: Timo K <toger5@hotmail.de>
* add docstring
Signed-off-by: Timo K <toger5@hotmail.de>
* Review: add additional test + fix pending promises issue.
Signed-off-by: Timo K <toger5@hotmail.de>
* review: `Pick` only a subset of membership manager events
Signed-off-by: Timo K <toger5@hotmail.de>
* reveiw: update probablyLeft logic to be more straight forward
Signed-off-by: Timo K <toger5@hotmail.de>
* fix test
Signed-off-by: Timo K <toger5@hotmail.de>
* make test not wait for 5s
Signed-off-by: Timo K <toger5@hotmail.de>
* review
Signed-off-by: Timo K <toger5@hotmail.de>
* fix linter (rebase)
Signed-off-by: Timo K <toger5@hotmail.de>
* fix import
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Introduce sessionDescription
Signed-off-by: Timo K <toger5@hotmail.de>
* Make sessionDescription part of a MatrixRTCSession
Signed-off-by: Timo K <toger5@hotmail.de>
* Make session manager only menage session for one sessionDescription
Signed-off-by: Timo K <toger5@hotmail.de>
* make membership manager aware about session (application + id)
Before this was just hardcoded to a call session
Signed-off-by: Timo K <toger5@hotmail.de>
* update tests
Signed-off-by: Timo K <toger5@hotmail.de>
* fix doc comments
Signed-off-by: Timo K <toger5@hotmail.de>
* Make fields private, improve comments, improve whitespace, don't use deprecated fields
Signed-off-by: Timo K <toger5@hotmail.de>
* add test for other application end event
Signed-off-by: Timo K <toger5@hotmail.de>
* rename call -> session
Signed-off-by: Timo K <toger5@hotmail.de>
* fix tests
Signed-off-by: Timo K <toger5@hotmail.de>
* remove id check since its already part of `deepCompare(membership.sessionDescription, sessionDescription)`
Signed-off-by: Timo K <toger5@hotmail.de>
* remove scope related tests. The id should be the only thing that scopes sessions. everything else is application (session type) specific
Signed-off-by: Timo K <toger5@hotmail.de>
* review
Signed-off-by: Timo K <toger5@hotmail.de>
* add test for custom sessionDescription
Signed-off-by: Timo K <toger5@hotmail.de>
* callMembershipsForRoom to default to call
Signed-off-by: Timo K <toger5@hotmail.de>
* roomSessionForRoom backwards compatible (And deprecate the call specific method)
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Support for creator power level
Adds support for infinite power level specified by [MSC4289](https://github.com/matrix-org/matrix-spec-proposals/pull/4289).
* Update unit test
* Hardcode versions
as room versions strings aren't ordered
* Add test for v12 rooms
* Use more compact syntax
* Fix doc
* Fix additionalCreators from PR edit
* Split out hydra room version check
* Move power level logic into room state
Which already has knowledge of the room create event
* Add docs
* Fix unused bits
* Fix docs
* Fix lying docstring
* Reverse logic for hydra semantics
Assume unknown room versions do use hydra
* Use backticks
* Switch back to hardcoding just the two hydra versions
---------
(cherry picked from commit e119bf9040)
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Support for creator power level
Adds support for infinite power level specified by [MSC4289](https://github.com/matrix-org/matrix-spec-proposals/pull/4289).
* Update unit test
* Hardcode versions
as room versions strings aren't ordered
* Add test for v12 rooms
* Use more compact syntax
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* Fix doc
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* Fix additionalCreators from PR edit
* Split out hydra room version check
* Move power level logic into room state
Which already has knowledge of the room create event
* Add docs
* Fix unused bits
* Fix docs
* Fix lying docstring
* Reverse logic for hydra semantics
Assume unknown room versions do use hydra
* Use backticks
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Switch back to hardcoding just the two hydra versions
---------
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* tests: Cross-signing keys support in `E2EKeyReceiver`
Have `E2EKeyReceiver` collect uploaded cross-signing keys, so that they can be
returned by `E2EKeyResponder`.
* tests: Signature upload support in `E2EKeyReceiver`
Have `E2EKeyReceiver` collect uploaded device signatures, so that they can be
returned by `E2EKeyResponder`.
* tests: Implement `E2EOTKClaimResponder` class
A new test helper, which intercepts `/keys/claim`, allowing clients under test
to claim OTKs uploaded by other devices.
* Expose experimental settings for encrypted history sharing
Add options to `MatrixClient.invite` and `MatrixClient.joinRoom` to share and
accept encrypted history on invite, per MSC4268.
* Clarify pre-join-membership logic
* Improve tests
* Update spec/integ/crypto/cross-signing.spec.ts
Co-authored-by: Hubert Chathi <hubertc@matrix.org>
---------
Co-authored-by: Hubert Chathi <hubertc@matrix.org>