* test: add a flushPromises
this seems to be needed because `initRustCrypto` now ends up doing slightly
less awaiting
* Support new `ShieldStateCode.MismatchedSender`
* Update to matrix-sdk-crypto-wasm 15.1.0
* Add `waitFor` and use it instead of `flushPromises`
* minor lints and fixes
* another lint fix
* Factor out `BaseRequestOpts`
... to make it easier to find the docs from methods that use it.
* fetch api: add support for downloading raw response
I need to make an authenticated request to the media repo, and expect to get a
binary file back. AFAICT there is no easy way to do that right now.
* Clarify doc strings
* Various fixes
Currently, this is looking for a `json` property on `IHttpOpts`. There is no
such property, so that part of the declaration is completely redundant, and we
may as well remove it.
I looked into making it check `IRequestOpts`, which *does* have a `json`
property, but couldn't make it work.
Also add some docs, while we're there.
* add custom local timout + add delay to 0 for normal local timeout.
* consider retry limits for new custom error
* mock the AbortError so we can reuse `actionUpdateFromErrors`
* update comment
* RTCEncryptionManager: Joiner key rotation grace period
* Test to clarify useKeyDelay and keyRotationGracePeriodMs interference
* make test more configurable
* rename delayRolloutTimeMillis to useKeyDelay same as config option
* rename skipRotationGracePeriod to keyRotationGracePeriodMs
* clarify that oldMemberships is not used by RTCEncryptionManager
* improve doc
* cleanup test
* more comment in test
* comment additions
* cleanup runOnlyPendingTimers
---------
Co-authored-by: Timo <toger5@hotmail.de>
* Make it easier to mock call memberships for specific user IDs
* Allow sending notification events when starting a call
* rename notify -> notification
* replace `joining` concept with `ownMembership`
* introduce new `m.rtc.notification` event alongside `m.call.notify`
* send new notification event alongside the deprecated one
* Test for new notification event type
* update relation string to match msc
* review
* fix doc errors
* fix tests + format
* remove anything decline related
---------
Co-authored-by: Timo <toger5@hotmail.de>
* Add `DebugLogger` type for logging matrix-js-sdk to `debug`
* unit tests for DebugLogger
* Use `DebugLogger` in some tests
* Use `DebugLogger` in rust-crypto.spec
* test-utils: silence some logging
* refactor: New encryption manager BasicEncryptionManager for todevice
fixup: bad do not commit
* fix: ToDevice transport not setting the sent_ts
* test: BasicEncryptionManager add statistics tests
* code review
* feat: Encryption manager just reshare on new joiner
* refactor: Rename BasicEncryptionManger to RTCEncryptionManager
* fixup: RTC experimental todevice should use new encryption mgr
* fixup: use proper logger hierarchy
* fixup: RTC rollout first key asap even if no members to send to
* fixup: RTC add test for first key use
* fixup! emitting outbound key before anyone registered
* fix: quick patch for transport switch, need test
* test: RTC encryption manager, add test for transport switch
* post rebase fix
* Remove bad corepack commit
* review: cleaning, renaming
* review: cleaning and renaming
* stop using root logger in favor of a parent logger
* post merge fix broken test
* remove corepack again
* fix reverted changes after a merge
* review: Properly deprecate getEncryptionKeys
* review: rename ensureMediaKeyDistribution to ensureKeyDistribution
* review: use OutdatedKeyFilter instead of KeyBuffer
* Use client logger for `RustBackupManager`
* use client logger in `CrossSigningIdentity`
* use client logger in `OutgoingRequestProcessor`
* RoomEncryptor: use correct logger for logDuration
use the logger for this specific event, rather than the more general one for the room
* Use client logger in `RoomEncryptor`
* Use client logger for sync
Use the logger attached to the MatrixClient when writing log messages out of
the sync api. This helps figure out what's going on when multiple clients are
running in the same JS environment.
* Use client logger for to-device message queue
* Use client logger in `PushProcessor.rewriteDefaultRules`
* use client logger in `ServerCapabilities`
* Mark global `logger` as deprecated
* Test: stop loading Olm into global namespace
Now that the js-sdk no longer relies on libolm, there is no need to populate
`globalThis.Olm`. Remove the code that did so (or relied on it being done).
* fix lint
* crypto: Add new ClientEvent.ReceivedToDeviceMessage
refactor rename ProcessedToDeviceEvent to ReceivedToDeviceEvent
* fix: Restore legacy isEncrypted() for to-device messages
* Update test for new preprocessToDeviceMessages API
* quick fix on doc
* quick update docs and renaming
* review: Better doc and names for OlmEncryptionInfo
* review: Remove IToDeviceMessage alias and only keep IToDeviceEvent
* review: improve comments of processToDeviceMessages
* review: pass up encrypted event when no crypto callbacks
* review: use single payload for ReceivedToDeviceMessage
* fix linter
* review: minor comment update
This prevents tsc from picking up random types from parent directories
such as in situations like an element-web layered build, and generally
seems like good hygiene as we don't want to pick up random types from
whatever directory we happen to be checked out into.
* Remove `LegacyMemberhsipManager`
* remove tests from rtc session
Those tests were only run with the legacy membership manager and are redundant with the memberhsip manager test spec.
* fix tests
* dont use non existing TestManager anymore
* remove fails for legacy
* fix another test