* Update for compatibility with v12 rooms
Stop using powerLevelNorm and reading PL events manually.
To support https://github.com/matrix-org/matrix-js-sdk/pull/4937
* Add test for leave space dialog
* Don't compute stuff if we don't need it
* Use room.client
* Use getSafeUserId
* Remove client arg
* Use getJoinedMembers
and add doc
* Fix tests
* Fix more tests
* Fix other test
* Clarify comment
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* MatrixChat-test: clean up better in `afterEach`
Make the MatrixChat tests behave better by letting them finish their work in an
`act` in afterEach. Otherwise we can end up mounting new components during
cleanup, which run tasks in the background
* MatrixChat-test: clean up dispatcher test
This test was kicking off a dispatcher job which would then open a
UserDeviceSettings dialog once the test had finished. That would then throw
exceptions because some of the mock environment had been torn down.
We're just testing that it opens the right dialog, so better to intercept
`createDialog`.
Aso add an `act` to reduce warnings, and replace a `flushPromises` with a
`waitFor` to make the test more robust.
* basic implementation of an /share?msg=foo endpoint
* SharePayload
* add sharing html & md while we're at it
* remove whitespace from imports to appease linter
* lint
* Add unit test
* More tests
* Test for showScreen
* Use one of the typed strings
* Test nasty tags stripped out
* Add playwright test
* Fix flake
by not relying on the name being synced as soon as we load
---------
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Dispatch an action when room is forgotten
* Dispatch an action when room is forgotten
* Remove room on action
* Add test
* Write test for matrixchat
* Add payload info to comment
* Debug flaky jest test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Discard changes to jest.config.ts
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch from defer to PromiseWithResolvers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add modernizr check
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>
* test: fix flaky MatrixChat `should persist login credentials` test
* test: fix flaky MatrixChat `should log and return to welcome page with correct error when login state is not found` test
* test: fix flaky MatrixChat `should store clientId and issuer in session storage` test
* Update react monorepo to v19
* Import JSX explicitly for React 19 compatibility
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update usages of refs for React 19 compatibility
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update react imports
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Avoid legacy contexts as much as possible
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Avoid deprecated React symbols
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Stash
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update usages of refs for React 19 compatibility
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>
* Switch pillify to use a html-react-parser approach rather than DOM muddling
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate react html parsing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate react html parsing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate html parsing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Memoize the EventContentBody component
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate html parsing
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>
* Simplify
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Discard changes to src/Linkify.tsx
* Discard changes to src/components/views/messages/TextualBody.tsx
* Discard changes to src/settings/handlers/AbstractLocalStorageSettingsHandler.ts
* 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>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Prepare for React 19 upgrade
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove stale comment
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>
* In force-verify mode, prevent bypassing by cancelling device verification
* Don't show the after-login screen if we are racing with forced verification
* Unit test for not bypassing verification by cancelling device verify
* Schedule dehydration on reload
* fix test and use the right function to check dehydration is enabled
* use dehydration helper function when scheduling dehydration on restart
* fix test by passing in client object
* refactor(MatrixChat): remove `MatrixClient.setGlobalErrorOnUnknownDevices` call
MatrixClient.setGlobalErrorOnUnknownDevices is not implemented in the rust-crypto and will be removed when the legacy crypto will be ripped out.
* test(e2e): remove `MatrixClient.setGlobalErrorOnUnknownDevices` call
MatrixClient.setGlobalErrorOnUnknownDevices is not implemented in the rust-crypto and will be removed when the legacy crypto will be ripped out.
* Remove FTUE onboarding as it is incompatible with SSO/OIDC
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove stale screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add commercial licence and update config files
* Update license in headers
* Revert "Update license in headers"
This reverts commit 7ed7949485.
* Update only spdx id
* Remove LicenseRef- from package.json
LicenseRef- no longer allowed in npm v3 package.json
This fixes the warning in the logs and failing build check.
* Harden Settings using mapped types
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix issues found during hardening
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>
* Remove oidc native flow stale key
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Factor out crypto setup process into a store
To make components pure and avoid react 18 dev mode problems due
to components making requests when mounted.
* fix test
* test for the store
* Add comment
* Enable key backup by default
When we set up cross signing, so the key backup key will be stored locally along with the cross signing keys until the user sets up recovery (4s). This will mean that a user can restore their backup if they log in on a new device as long as they verify with the one they registered on.
Replaces https://github.com/element-hq/element-web/pull/28267
* Fix test
* Prompt user to set up 4S on logout
* Fix test
* Add playwright test for key backup by default
* Fix imports
* This isn't unexpected anymore
* Update doc
* Fix docs and function name on renderSetupBackupDialog()
* Use checkKeyBackupAndEnable
* Docs for setup encryption toast
* Also test the toast appears
* Update mock for the method we use now
* Okay fine I guess we need both
* Swap here too
* Fix comment & doc comments
* Remove abandoned Voice Broadcasts labs flag
Any existing voice broadcasts will be shown as a series of voice messages which will sequence play as normal
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove dead code
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use `CryptoApi.getKeyBackupInfo` instead of deprecated `MatrixClient.getKeyBackupVersion`
* Review changes
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `DeviceListener.ts`
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `Searching.ts`
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `SlidingSyncManager.ts`
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `EncryptionEvent.tsx`
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `ReportEventDialog.tsx`
* Replace `MatrixClient.isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `RoomNotifications.tsx`
* Fix MessagePanel-test.tsx
* ReplaceReplace `MatrixCient..isRoomEncrypted` by `MatrixClient.CryptoApi.isEncryptionEnabledInRoom` in `shouldSkipSetupEncryption.ts`
* Add missing `await`
* Use `Promise.any` instead of `asyncSome`
* Add `asyncSomeParallel`
* Use `asyncSomeParallel` instead of `asyncSome`
* Remove boilerplate around dispatcher and settings watchers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move state update listeners from constructor to componentDidMount
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch ModalManager to the React 18 createRoot API
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>
* Refactor CreateCrossSigningDialog
* Converts CreateCrossSigningDialog to a functional component
* Pulls logic out to its own class
* Updates usage of deprecated cross signing bootstrap method on client to be on the crypto object and updates test to match
Moved from https://github.com/element-hq/matrix-react-sdk/pull/131
* Add mock here too
* Use the right mock
* Remove duplicate mock
* Stray jest mock line
* Un-move mocks
* tsdoc
* Typo
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
---------
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* Migrating deprecated sync `MatrixClient.getKeyBackupEnabled` to async `MatrixClient.CryptoApi.getActiveSessionBackupVersion` in `NewRecoveryMethodDialog`.
Rewrite `NewRecoveryMethodDialog` into a functional component to make it easier to handle the new async method.
* Migrating deprecated sync `MatrixClient.getKeyBackupEnabled` to async `MatrixClient.CryptoApi.getActiveSessionBackupVersion` in `MatrixChat`.