* Update all non-major dependencies
* Prettier
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix types for widget API update
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove the compare function from utils
and change the one use of it to just intantiate a collator and use
it.
This was marked as internal module so this shouldn't be a breaking change.
Of course, react-sdk was using it.
Requires: https://github.com/matrix-org/matrix-react-sdk/pull/12782
* Add simple not-a-perf-test test
* recalculate repeatedly
otherwise we aren't testing anything different
* Use fewer members as it was making the test take a bit too long
* Inline subtlecrypto shim
The presence of this thing just makes code more confusing.
* Remove pre-node-20 webcrypto hack
Until node 20.0, the webcrypto API lived at `crypto.webCrypto`. It's now
available at the same place as in web -- `globalThis.crypto`.
See: https://nodejs.org/docs/latest-v20.x/api/webcrypto.html#web-crypto-api
* oidc auth test: Clean up mocking
THe previous reset code wasn't really resetting the right thing. Let's just
re-init `window.crypto` on each test.
* Remove `crypto` shim
This isn't very useful any more.
* Fix room state being updated with old (now overwritten) state and emitting for those updates.
* remove timestamp condition
Add configuration for toStartOfTimeline
* fix timeline tests
* only skip event adding if event_id and replaces_state is set.
* fix room tests
* test skipping insertion
* rename back to lastStateEvent
* store if a state is at the start of a timeline in the RoomState class
* make `isStartTimelineState` a `public readonly` and fix condition.
* Add ability to choose how many timeline events to sync when peeking.
* Add a test that covers the new method parameter.
* Formatting.
---------
Co-authored-by: Joel <joel.garplind+github@gmail.com>
We had both an `onIncomingKeyVerificationRequest` and an
`onKeyVerificationRequest` which did different, but related, things.
Improve the documentation and reduce the duplication.
I believe the only reason we had this was that, before Node v11.0,
`TextEncoder` wasn't available in the global object. Nowadays it is (see
https://nodejs.org/api/util.html#class-utiltextencoder), so let's get rid of
it.
* Add fetching the well known in embedded mode.
This is used to load the focus from the well known in elment-call.
* revert what we dont want in this PR.
* Update src/client.ts
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
---------
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
* Prefix the user+device state key if needed
No need to prefix it for rooms that use MSC3779.
Otherwise, prefix it to bypass the auth rule for state events with keys
starting with @.
* Use RegExp.exec() method instead
Sonar typescript:S6594
* Split nested ternary operator into method
Sonar typescript:S3358
* Add test coverage
* Move `RustVerificationRequest.onChange` out to a method
The only reason it was an inner function in the first place was to avoid
storing a reference in the class to `outgoingRequestProcessor`. That changed
with d1dec4cd08.
* Fix reference cycles in rust verification code
* Bump ES target version to ES2022
I want to be able to use `WeakRef`, and per
https://github.com/element-hq/element-web/issues/24913#issuecomment-2182448007,
I believe this should be safe.
* room.ts: Fix initialisation order
It seems that ES2022 causes typescript to change the initialization order of
regular properties vs parameter properties
(https://github.com/microsoft/TypeScript/issues/45995), so we need to rearrange
the initializations to avoid an error.
In practice, it might be fine because we have enabled
`babel-plugin-transform-class-properties`, which moves the initialization back
after the parameter property, but we shoudn't rely on that, and anyway it
upsets the linter.
* Use legacy call membership if anyone else is
* Convert nullish to boolean
* Update tests
* Lint
* Use computed decision to use legacy events or not
* Check if discovered legacy sessions are ongoing
* Lint
* Lint again
* Increase test coverage
* Fetch capabilities in the background
& keep them up to date
* Add missed await
* Replace some more runAllTimers
and round down the wait time for sanity
* Remove double comment
* Typo
* Add a method back that will fetch capabilities if they're not already there
* Add tests
* Catch exception here too
* Add test for room version code
* Use server name instead of homeserver url to allow well-known lookups during QR OIDC reciprocation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add via parameter for MSC4156
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
* Always include both parameters
* Fix tests
---------
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
* Refactor to preferred and active foci.
Signed-off-by: Timo K <toger5@hotmail.de>
* make the sdk compatible with MSC4143 but still be backwards compatible
* comment fixes
* also fallback to legacy if the current member event is legacy
* use XOR types
* use EitherAnd
* make livekit Foucs types simpler
* review
* fix tests
* test work
* more review + more tests
* remove unnecassary await that is in conflict with the comment
* make joinRoomSession sync
* Update src/matrixrtc/MatrixRTCSession.ts
Co-authored-by: Andrew Ferrazzutti <af_0_af@hotmail.com>
* review
* fix
* test
* review
* review
* comment clarification
* typo
---------
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Andrew Ferrazzutti <af_0_af@hotmail.com>
* Fix screen sharing in recent Chrome
Dreadful hack to work around a bug in recent chrome/electron's
WebRTC, as explained.
I'm not sure which is the least hideous out of this (ie. repeatedly
calling setCodecPreferences and seeing if it crashes each time) or
hardcoding the bad codec and skipping it. Opinions welcome.
* Unused import
* Remove commented line
* RustCrypto: Move CryptoBackend impl to CryptoBackend impl section
Given there is a `CryptoBackend implementation` section, the methods
implementing CryptoBackend should be there.
* RustCrypto: Fix documentation on dehydration methods
* RustCrypto: reunite `resetKeyBackup` with its helper
A couple of new methods had snuck into the middle.
* Add crypto methods for OIDC QR code login
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert test due to hang inside Rust.
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update test name
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update test name
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add note about MSC3886, MSC3903 and MSC3906 being closed
* Move comments in to jsdoc
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Don't run migration for Rust crypto if the legacy store is empty
Fixes https://github.com/element-hq/element-web/issues/27447
* Add copyright for the TypeScript files in legacy DB dumps
* Provide a type for the accountPickle we check for before migration
* Remove redundant backup response
This is unused
* Simplify keys response
* Downgrade log message.
---------
Co-authored-by: Richard van der Hoff <richard@matrix.org>
Slightly more involved than normal because it requires us to pass a backup version into OlmMachine.importBackedUpRoomKeys.
On the other hand we can now re-enable the test that was disabled in #4214 due to matrix-org/matrix-rust-sdk#3447Fixes: element-hq/element-web#27165
* `initRustCrypto`: allow app to pass in the store key directly
... instead of using the pickleKey. This allows us to avoid a slow PBKDF
operation.
* Fix link in doc-comment