Commit Graph

27 Commits (d9e943d9a84abd55bde2f649d22b73d29b9b0c7d)

Author SHA1 Message Date
David Langley 491f0cd08a
Change license (#13)
* Copyright headers 1

* Licence headers 2

* Copyright Headers 3

* Copyright Headers 4

* Copyright Headers 5

* Copyright Headers 6

* Copyright headers 7

* Add copyright headers for html and config file

* Replace license files and update package.json

* Update with CLA

* lint
2024-09-09 13:57:16 +00:00
Richard van der Hoff 489bc32674
Remove references to some deprecated js-sdk identifiers (#12729)
* IKeyBackupInfo -> KeyBackupInfo

* ICryptoCallbacks -> CryptoCallbacks

* IRoomEncryption -> RoomEncryptionEventContent

* MEGOLM_ALGORITHM -> a single local constant

* UserTrustLevel -> UserVerificationStatus
2024-07-04 15:50:07 +00:00
Michael Telatynski 148a360598
Avoid using deprecated exports, fields, and duplicate code (#12555) 2024-05-28 08:41:20 +01:00
Valere a29cabe45a
Report verification and recovery state to posthog (#12516)
* Report verification and recovery state to posthog

* Fix CryptoApi import

* Fix js-sdk import

* Review: Use DeviceVerificationStatus instead of CrossSigningStatus

* Review: Clean condition to check secrets in 4S

* review: Fix redundent !!
2024-05-21 14:37:00 +00:00
Richard van der Hoff 51ec7f04b4
DeviceListener: Remove usage of deprecated keybackup API (#11614)
Primarily this means calling `CryptoApi.getActiveSessionBackupVersion` instead
of `MatrixClisnt.getKeyBackupEnabled`
2023-09-20 11:34:18 +00:00
Florian Duros 579b0dd10a
ElementR: Cross user verification (#11364)
The hard work has been done in previous PRs in the js-sdk, so this is now just a case of updating a few call sites to use the new APIs.
2023-09-18 17:34:00 +01:00
Richard van der Hoff 6cc42b7e2e
Improve error handling for `DeviceListener` (#11484)
... particularly for when it races with a client shutdown.
2023-08-30 09:35:15 +00:00
Richard van der Hoff 7a6d81c3b8
Update Jest to more recent release (#11409)
* Update Jest to more recent release

I want to use things like `jest.advanceTimersByTimeAsync`

* more jest updates

* add dep on types/prettier

* fix LegacyRoomHeader-test

* fix MatrixChat-test

* fix RoomView-test

* fix PollHistory-test

* update SidebarUserSettingsTab-test

* fix PipContainer-test

* fix UserOnboardingPage-test

* fix WidgetContextMenu-test.tsx

* Avoid `mockImplementation` for mock `matchMedia` impl

`mockImplementation` is (now) reset by `jest.resetAllMocks` and
`jest.restoreAllMocks`, which we don't really want here.

Fixes `theme-test`

* Move `mediaDevices` mock out of `setupManualMocks`

This doesn't work well in test suites with multiple tests, because the
`mockReturnValue` is reset for subsequent tests.

In any case, having it mocked out automagically is *magical*. Let's make it
opt-in.

* fix FormattingButtons-test.tsx

* fix DeviceListenerTest

* fix RoomTile-test
2023-08-16 10:20:48 +00:00
Michael Telatynski 368b6b9355
Switch to importing models/{event-timeline{,set},user,device,event-status} from main js-sdk export (#11368) 2023-08-08 07:16:04 +00:00
Michael Telatynski 21ffc50f1e
Pass around MatrixClients instead of using MatrixClientPeg (#10984)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-06-01 14:43:24 +01:00
Richard van der Hoff 38c13509fd
Use new `getCrossSigningKeyId` instead of old `getCrossSigningId` (#10885)
* Use new `getCrossSigningKeyId` instead of old `getCrossSigningId`

* Fix type error
2023-05-15 18:30:43 +00:00
Richard van der Hoff a597da26a0
DeviceListener: replace calls to deprecated APIs (#10883)
* DeviceListener: replace calls to deprecated APIs

* fix tests
2023-05-12 15:55:01 +00:00
Richard van der Hoff 5e8488c283
`DeviceListener`: use new `getUserDeviceInfo` method (#10826)
* DeviceListener: use new `getUserDeviceInfo` method

https://github.com/matrix-org/matrix-js-sdk/pull/3272 added a new
`CryptoApi.getUserDeviceInfo` method, which also works with rust crypto. Update
DeviceListener to use it, thus making many of the cypress tests work on Element
Web R.

* add missing await

... mostly to silence the quality gate
2023-05-09 13:39:51 +00:00
Richard van der Hoff d7bb8043ea
Replace uses of `checkDeviceTrust` with `getDeviceVerificationStatus` (#10663)
matrix-org/matrix-js-sdk#3287 and matrix-org/matrix-js-sdk#3303 added a new API called getDeviceVerificationStatus. Let's use it.
2023-04-24 14:19:46 +01:00
Richard van der Hoff 6b451afc50
Remove dependency on `org.matrix.e2e_cross_signing` unstable feature (#10593)
* Remove dependency on `org.matrix.e2e_cross_signing` unstable feature

Currently, we have some code that relies on the server declaring support for an
`unstable_feature` called `org.matrix.e2e_cross_signing`. There is nothing in
the spec that requires this, so this would make us incompatible with some
server implementations.

The features in question were added in spec v1.1, so we can test for that
instead.

* fix unit test
2023-04-14 10:14:05 +00:00
Kerry aeb9f4373f
Device manager - use deleteAccountData to prune device manager client information events (#9734) 2022-12-14 04:59:23 +00:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Kerry 82ad8d5aa2
Snooze the bulk unverified sessions reminder on dismiss (#9706)
* test bulk unverified sessions toast behaviour

* unverified sessions toast text tweak

* only show bulk unverified sessions toast when current device is verified

* add Setting for BulkUnverifiedSessionsReminder

* add build config for BulkUnverifiedSessionsReminder

* add more assertions for show/hide toast, fix strict errors

* fix strict error

* add util methods for snoozing in local storage

* rename nag to reminder

* set and read snooze for toast

* test snooze

* remove debug

* strict fix

* remove unused code
2022-12-06 06:18:03 +00:00
Kerry 81098b9914
Add config setting to disable bulk unverified sessions nag (#9657)
* test bulk unverified sessions toast behaviour

* unverified sessions toast text tweak

* only show bulk unverified sessions toast when current device is verified

* add Setting for BulkUnverifiedSessionsReminder

* add build config for BulkUnverifiedSessionsReminder

* add more assertions for show/hide toast, fix strict errors

* fix strict error
2022-12-02 03:24:45 +00:00
Kerry 5742c24114
Only display bulk unverified sessions nag when current session is verified (PSG-893) (#9656)
* test bulk unverified sessions toast behaviour

* unverified sessions toast text tweak

* only show bulk unverified sessions toast when current device is verified

* add more assertions for show/hide toast, fix strict errors

* fix strict error

* really fix strict error
2022-12-02 02:59:46 +00:00
Kerry 1d4cbee81c
test bulk unverified sessions toast behaviour (#9655)
* test bulk unverified sessions toast behaviour

* add more assertions for show/hide toast, fix strict errors
2022-12-01 08:47:20 +01:00
Kerry 66a9636ec5
Device manager - remove client information events when disabling setting (#9384)
* remove client information events when disabling setting

* tweak naming

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-10 19:00:46 +00:00
Kerry 16c3efead5
Device manager - display client information in device details (PSG-682) (#9315)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type
2022-10-04 13:12:23 +00:00
Kerry 0ded5e0505
Device manager - record device client information on app start (PSG-633) (#9314)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* add opt in setting for recording device information
2022-10-04 09:53:23 +02:00
Travis Ralston a987ead7d2 Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
Michael Telatynski f25e6813bb
Mandate use of js-sdk/src/matrix import over js-sdk/src (#7933) 2022-03-01 20:42:05 +00:00
Kerry b5e7d12f76
Add config option to autorageshake when key backup is not enabled (#7741)
* report on not enabled

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add setting

Signed-off-by: Kerry Archibald <kerrya@element.io>

* check key backup status after crypto init

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove log

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test encryption setup in DeviceListener

Signed-off-by: Kerry Archibald <kerrya@element.io>

* i18n

Signed-off-by: Kerry Archibald <kerrya@element.io>

* sendLogs for key backup auto-report event

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove reloadOnChagneController

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-11 14:00:37 +01:00