* 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
* Check for `unknown variant` on to-device sending and fallback to room event encryption.
* fix tests
* fix error js-sdk api type
* Change logger from debug to warn for unsupported to-device transport and improve error message comments
* also add case for not supported
This will be send by the driver in case we sent an encrypted to-device but do not have support of that.
---------
Co-authored-by: Robin <robin@robin.town>
* Switch from defer to Promise.withResolvers
As supported by the outgoing LTS version (v22) which has 99% support of ES2024
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Deprecate defer instead of killing it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Knip
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate based on review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate based on review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate based on review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* MatrixRTC: ToDevice distribution for media stream keys
* test: Add RTC to device transport test
* lint
* fix key indexing
* fix indexing take two
- use correct value for: `onEncryptionKeysChanged`
- only update `latestGeneratedKeyIndex` for "this user" key
* test: add test for join config `useExperimentalToDeviceTransport`
* update test to fail without the fixed encryption key index
* review
* review (dave)
---------
Co-authored-by: Timo <toger5@hotmail.de>