David Baker
d950cda05c
Merge branch 'develop' into robertlong/group-call
2022-09-08 15:03:55 +01:00
Travis Ralston
8716c1ab9b
Convert several internal maps to real maps
2022-08-31 09:21:46 -06:00
Robin
3334c01191
Support nested Matrix clients via the widget API ( #2473 )
...
* WIP RoomWidgetClient
* Wait for the widget API to become ready before backfilling
* Add support for sending user-defined encrypted to-device messages
This is a port of the same change from the robertlong/group-call branch.
* Fix tests
* Emit an event when the client receives TURN servers
* Expose the method in MatrixClient
* Override the encryptAndSendToDevices method
* Add support for TURN servers in embedded mode and make calls mostly work
* Don't put unclonable objects into VoIP events
RoomWidget clients were unable to send m.call.candidate events, because
the candidate objects were not clonable for use with postMessage.
Converting such objects to their canonical JSON form before attempting
to send them over the wire solves this.
* Fix types
* Fix more types
* Fix lint
* Upgrade matrix-widget-api
* Save lockfile
* Untangle dependencies to fix tests
* Add some preliminary tests
* Fix tests
* Fix indirect export
* Add more tests
* Resolve TODOs
* Add queueToDevice to RoomWidgetClient
2022-08-09 09:45:58 -04:00
David Baker
575b416856
Simplify encryptAndSendToDevices ( #2566 )
...
It went to quite a lot of effort to gather a bunch of information to
return, but the only thing using it already had all that info anyway.
2022-08-05 15:58:33 +01:00
Robin
c36bfc821c
Add support for sending user-defined encrypted to-device messages ( #2528 )
...
* Add support for sending user-defined encrypted to-device messages
This is a port of the same change from the robertlong/group-call branch.
* Fix tests
* Expose the method in MatrixClient
* Fix a code smell
* Fix types
* Test the MatrixClient method
* Fix some types in Crypto test suite
* Test the Crypto method
* Fix tests
* Upgrade matrix-mock-request
* Move useRealTimers to afterEach
2022-08-03 16:16:48 +00:00
Faye Duxovni
5367ee18fb
Re-insert room IDs when decrypting bundled redaction events returned by /sync ( #2531 )
2022-07-21 10:55:20 +00:00
Travis Ralston
08ab51eeac
Remove unstable support for m.room_key.withheld ( #2512 )
...
We no longer send or receive the unstable type.
2022-07-13 08:56:01 -06:00
Michael Telatynski
b43b4aa9f9
Log real errors and not just their messages, traces are useful ( #2464 )
2022-06-15 12:44:42 +00:00
Michael Telatynski
b9ca3ceacd
Remove unused sessionStore ( #2455 )
...
* Remove unused sessionStorage layer
* Move pending event abstraction into its temporary home
* Add test coverage
* Tweak
* Fix tests mocks
* Add coverage
* Add coverage
2022-06-14 21:29:21 +01:00
Jonathan de Jong
78db74dad8
Various changes to src/crypto files for correctness ( #2137 )
...
* make various changes for correctness
* apply some review feedback
* Address some review feedback
* add some more correctness
* refactor ensureOutboundSession to fit types better
* change variable naming slightly to prevent confusion
* some wording around exception-catching
* Tidy test
* Simplify
* Add tests
* Add more test coverage
* Apply suggestions from code review
Co-authored-by: Travis Ralston <travpc@gmail.com >
* Update crypto.spec.js
* Update spec/unit/crypto.spec.js
Co-authored-by: Faye Duxovni <duxovni@duxovni.org >
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
Co-authored-by: Travis Ralston <travpc@gmail.com >
Co-authored-by: Faye Duxovni <duxovni@duxovni.org >
2022-06-13 19:05:03 +00:00
Faye Duxovni
e35ede0370
The request callback provided by bootstrapCrossSigning is async ( #2431 )
2022-06-03 08:58:14 -04:00
Michael Telatynski
4721aa1d24
Fix up more types & Sonar warnings ( #2363 )
...
* Fix up more types & Sonar warnings
* Fix test
* Add first test for callEventHandler
2022-05-12 10:12:39 +01:00
Michael Telatynski
49dd76b91e
Remove redundant checkKey param on isSecretStored ( #2360 )
2022-05-11 10:53:52 +01:00
Michael Telatynski
706b4d6054
Improve typing ( #2352 )
...
* Fix typing of the store interface
* Fix typed s'more
* re-add check
* Be less dumb
* arg
* Fix types
2022-05-09 11:58:52 +01:00
Michael Telatynski
8be30acb11
Apply suggestions from SonarQube ( #2340 )
2022-05-03 15:40:57 -06:00
Michael Telatynski
b896111269
Apply corrections identified by SonarQube ( #2336 )
...
* Apply corrections identified by SonarQube
* Apply corrections identified by SonarQube
* Make type more flexible
2022-05-02 03:23:17 +01:00
Faye Duxovni
db58a66e19
Add method for checking whether our other devices are cross-signed, even when this device isn't ( #2288 )
2022-04-19 15:02:17 +01:00
Andy Balaam
f03a391f80
Prevent exception 'Unable to set up secret storage' ( #2260 )
2022-03-28 11:48:34 +01:00
Hubert Chathi
17f3920ddd
Send and handle stable name for withheld codes ( #2232 )
...
since MSC2399 is finished FCP and it's in the spec, we can use the stable name
now
2022-03-11 16:21:06 -05:00
Michael Telatynski
12e525b664
Improve typing around event emitter handlers ( #2180 )
2022-02-22 12:18:07 +00:00
Michael Telatynski
2bb14698a5
Revert "Sign backup with cross-signing key when we reset it." ( #2175 )
2022-02-14 19:11:06 +00:00
Hubert Chathi
cfad8d3614
Enable key backup after we reset it ( #2170 )
...
This ensures that we remember it if bootstrapCrossSigning gets called, so that
the authData gets signed by the master key, if a new key is created.
2022-02-11 08:42:49 -05:00
Michael Telatynski
2d9c938765
Support cancelling events whilst they are in status = ENCRYPTING ( #2095 )
2022-01-11 15:03:33 +00:00
Hugh Nimmo-Smith
2aae2362e3
Fix incorrect TS return type for secret storage and key backup functions ( #2082 )
2021-12-20 16:52:50 +00:00
Michael Telatynski
963c7690b6
Iterate typing to work towards noImplicitAny ( #2061 )
2021-12-14 14:32:35 +00:00
Hubert Chathi
dd8c157bb9
Improve fallback key behaviour ( #2037 )
2021-12-09 19:00:23 -05:00
Michael Telatynski
4e9fe8f53f
Fix types ( #2056 )
2021-12-09 15:44:07 +00:00
Michael Telatynski
f8097221e6
Improve typing ( #2055 )
2021-12-09 14:22:58 +00:00
Michael Telatynski
b2d83c1f80
Iterate type definitions ( #2029 )
2021-11-19 17:35:09 +00:00
Travis Ralston
1b91cd7037
Add optional force parameter when ensuring Olm sessions ( #2027 )
...
This is useful for debugging crypto where Element's `/discardsession` doesn't reset the Olm session.
2021-11-19 07:33:45 -07:00
David Baker
0a3d820fda
Merge pull request #1943 from freaktechnik/develop
...
Fix `requestVerificationDM` with chronological `pendingEventOrdering`
2021-10-14 12:14:20 +01:00
Šimon Brandner
0042cb5292
Fix importRoomKeys() definition
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
2021-10-13 16:50:27 +02:00
Martin Giger
482e3c4cb7
Skip waiting if already sent and abort on cancel
2021-09-30 16:58:08 +02:00
Martin Giger
3c97d17770
Fix requestVerificationDM with chronological pendingEventOrdering
...
Signed-off-by: Martin Giger <martin@humanoids.be >
2021-09-21 20:04:07 +02:00
Germain Souquet
fed0ced89d
Type fixes for CreateSecretStorageDialog TS migration
2021-09-12 08:56:31 +02:00
Travis Ralston
04fdcbb672
Exclude opt-in Element performance metrics from encryption
...
This is needed for the system which is meant to be monitoring this metadata. See https://github.com/matrix-org/matrix-react-sdk/pull/6766
2021-09-08 11:34:01 -06:00
Michael Telatynski
b6c857e2a2
Convert crypto/verification/* to Typescript
2021-09-08 12:34:44 +01:00
Michael Telatynski
f07cdb43b1
Fix dehydration Crypto type
2021-09-07 14:39:49 +01:00
Michael Telatynski
666e471369
Convert OlmDevice to Typescript
2021-09-07 13:22:27 +01:00
Michael Telatynski
011a2acfd2
Convert crypto/store/* to Typescript
2021-07-24 11:35:30 +01:00
Michael Telatynski
cb192d3c74
Merge pull request #1777 from matrix-org/t3chguy/ts/c1
2021-07-14 17:19:03 +01:00
Michael Telatynski
33deef9f2c
Rework devtools and get rid of flippy tgl button
2021-07-13 10:33:33 +01:00
Michael Telatynski
17efcad6fe
Improve and consolidate typing
2021-07-10 15:50:40 +01:00
Hubert Chathi
061199ec3c
Merge pull request #1775 from uhoreg/symmetric_backup
...
Symmetric backup
2021-07-09 10:31:43 -04:00
David Baker
05a20ab56f
Fix up keys even if key backup isn't enabled
...
Mostly because that's what the test tests, so let's keep that
behaviour the same.
2021-07-08 21:30:50 +01:00
David Baker
964aa6d94a
Update comment
2021-07-08 21:20:34 +01:00
David Baker
1a17b138ce
Attempt to fix megolm key not being in SSSS
...
If the account has both a key backup and SSSS enabled but the key
backup key isn't stored in SSSS, try to save it there by getting
it from either the cache or the user (if perhaps it's the same as
their security passphrase but lost a passthrough entry).
Fixes https://github.com/vector-im/element-web/issues/17886
2021-07-08 21:12:45 +01:00
Hubert Chathi
2e27e247f3
Merge branch 'develop' into symmetric_backup
2021-07-08 15:16:07 -04:00
Hubert Chathi
c8a7820cb3
fix types
2021-07-07 19:46:01 -04:00
Hubert Chathi
17dc1bda19
Merge branch 'develop' into symmetric_backup
2021-07-07 19:19:56 -04:00