* Implement Sticky Events MSC
* Renames
* lint
* some review work
* Update for support for 4-ples
* fix lint
* pull through method
* Fix the mistake
* More tests to appease SC
* Cleaner code
* Review cleanup
* Refactors based on review.
* lint
* Add sticky event support to the js-sdk
Signed-off-by: Timo K <toger5@hotmail.de>
* use sticky events for matrixRTC
Signed-off-by: Timo K <toger5@hotmail.de>
* make sticky events a non breaking change (default to state events. use joinConfig to use sticky events)
Signed-off-by: Timo K <toger5@hotmail.de>
* review
- fix types (`msc4354_sticky:number` -> `msc4354_sticky?: { duration_ms: number };`)
- add `MultiKeyMap`
Signed-off-by: Timo K <toger5@hotmail.de>
* Refactor all of this away to it's own accumulator and class.
* Add tests
* tidyup
* more test cleaning
* lint
* Updates and tests
* fix filter
* fix filter with lint
* Add timer tests
* Add tests for MatrixRTCSessionManager
* Listen for sticky events on MatrixRTCSessionManager
* fix logic on filtering out state events
* lint
* more lint
* tweaks
* Add logging in areas
* more debugging
* much more logging
* remove more logging
* Finish supporting new MSC
* a line
* reconnect the bits to RTC
* fixup more bits
* fixup testrs
* Ensure consistent order
* lint
* fix log line
* remove extra bit of code
* revert changes to room-sticky-events.ts
* fixup mocks again
* lint
* fix
* cleanup
* fix paths
* tweak test
* fixup
* Add more tests for coverage
* Small improvements
Signed-off-by: Timo K <toger5@hotmail.de>
* review
Signed-off-by: Timo K <toger5@hotmail.de>
* Document better
* fix sticky event type
Signed-off-by: Timo K <toger5@hotmail.de>
* fix demo
Signed-off-by: Timo K <toger5@hotmail.de>
* fix tests
Signed-off-by: Timo K <toger5@hotmail.de>
* Update src/matrixrtc/CallMembership.ts
Co-authored-by: Robin <robin@robin.town>
* cleanup
* lint
* fix ci
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Half-Shot <will@half-shot.uk>
Co-authored-by: Robin <robin@robin.town>
* Add `CryptoApi.getSecretStorageStatus`
`isSecretStorageReady` is a bit of a blunt instrument: it's hard to see from
logs *why* the secret storage isn't ready.
Add a new method which returns a bit more data.
* Update src/rust-crypto/rust-crypto.ts
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
---------
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* add parseCallNotificationContent
Signed-off-by: Timo K <toger5@hotmail.de>
* add tests
Signed-off-by: Timo K <toger5@hotmail.de>
* remove decline reason and better m.mentions check
Signed-off-by: Timo K <toger5@hotmail.de>
* cap ring duration to EX value (90s)
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* MSC4140: support filters on delayed event lookup
Support looking up scheduled/finalised delayed events, and looking up a
single delayed event.
* Add test coverage for delayed event lookup filters
* Prettier
* Use it.each for test loop
* Support multiple delayIds
* Support single or multiple delayIds
As it may be more common to look up a single delayed event than to look
up many of them, support passing a single delayID in the lookup function
instead of needing to pass a single-element array.
* WIP
* temp
Signed-off-by: Timo K <toger5@hotmail.de>
* Fix imports
* Fix checkSessionsMembershipData thinking foci_preferred is required
* incorporate CallMembership changes
- rename Focus -> Transport
- add RtcMembershipData (next to `sessionMembershipData`)
- make `new CallMembership` initializable with both
- move oldest member calculation into CallMembership
Signed-off-by: Timo K <toger5@hotmail.de>
* use correct event type
Signed-off-by: Timo K <toger5@hotmail.de>
* fix sonar cube conerns
Signed-off-by: Timo K <toger5@hotmail.de>
* callMembership tests
Signed-off-by: Timo K <toger5@hotmail.de>
* make test correct
Signed-off-by: Timo K <toger5@hotmail.de>
* make sonar cube happy (it does not know about the type constraints...)
Signed-off-by: Timo K <toger5@hotmail.de>
* remove created_ts from RtcMembership
Signed-off-by: Timo K <toger5@hotmail.de>
* fix imports
Signed-off-by: Timo K <toger5@hotmail.de>
* Update src/matrixrtc/IMembershipManager.ts
Co-authored-by: Robin <robin@robin.town>
* rename LivekitFocus.ts -> LivekitTransport.ts
Signed-off-by: Timo K <toger5@hotmail.de>
* add details to `getTransport`
Signed-off-by: Timo K <toger5@hotmail.de>
* review
Signed-off-by: Timo K <toger5@hotmail.de>
* use DEFAULT_EXPIRE_DURATION in tests
Signed-off-by: Timo K <toger5@hotmail.de>
* fix test `does not provide focus if the selection method is unknown`
Signed-off-by: Timo K <toger5@hotmail.de>
* Update src/matrixrtc/CallMembership.ts
Co-authored-by: Robin <robin@robin.town>
* Move `m.call.intent` into the `application` section for rtc member events.
Signed-off-by: Timo K <toger5@hotmail.de>
* review on rtc object validation code.
Signed-off-by: Timo K <toger5@hotmail.de>
* user id check
Signed-off-by: Timo K <toger5@hotmail.de>
* review: Refactor RTC membership handling and improve error handling
Signed-off-by: Timo K <toger5@hotmail.de>
* docstring updates
Signed-off-by: Timo K <toger5@hotmail.de>
* add back deprecated `getFocusInUse` & `getActiveFocus`
Signed-off-by: Timo K <toger5@hotmail.de>
* ci
Signed-off-by: Timo K <toger5@hotmail.de>
* Update src/matrixrtc/CallMembership.ts
Co-authored-by: Robin <robin@robin.town>
* lint
Signed-off-by: Timo K <toger5@hotmail.de>
* make test less strict for ew tests
Signed-off-by: Timo K <toger5@hotmail.de>
* Typescript downstream test adjustments
Signed-off-by: Timo K <toger5@hotmail.de>
* err
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
* Implement Sticky Events MSC
* Renames
* lint
* some review work
* Update for support for 4-ples
* fix lint
* pull through method
* Fix the mistake
* More tests to appease SC
* Cleaner code
* Review cleanup
* Refactors based on review.
* lint
* Store sticky event expiry TS at insertion time.
* proper type
* Use checked way to get OlmMachine
* Factor out two variables in onKeyVerificationEvent
* Make sure verification test waits for the request to be processed
* Fetch the user's device info before processing a verification request
If we don't have the device info for a user when we receive their
verification request, we ignore it. This change gives us the best
possible chance of having the right device data before we try to process
the verification.
Fixes#30693Fixes#27819
- rename Focus -> Transport
- add RtcMembershipData (next to `sessionMembershipData`)
- make `new CallMembership` initializable with both
- move oldest member calculation into CallMembership
Signed-off-by: Timo K <toger5@hotmail.de>
* Add media hint specifier
* Refactor to use m.call.intent and to apply to membership
* lint
* Add a mechanism to get the consensus of a call.
* Update tests
* Expose option to update the call intent.
* Better docs
* Add tests
* lint
* Update matrix-sdk-crypto-wasm to 15.2.0
Most relevant changes:
- History sharing: improve efficiency of building key bundle
([matrix-rust-sdk#5513](https://github.com/matrix-org/matrix-rust-sdk/issues/5513))
* Work around matrix-rust-sdk#5643
Modify the message content coming from Rust API to include the missing
property `msgtype: m.key.verification.request`
* 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
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>