* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix duplicated lint rule
* utils to persist clientId and issuer after oidc authentication
* add dep oidc-client-ts
* persist issuer and clientId after successful oidc auth
* add OidcClientStore
* comments and tidy
* format
* Offer to unban user during invite if inviter has sufficient permissions
* Improve unban check in MultiInviter
* Improve coverage
* Update src/utils/MultiInviter.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* add delegatedauthentication to validated server config
* dynamic client registration functions
* test OP registration functions
* add stubbed nativeOidc flow setup in Login
* cover more error cases in Login
* tidy
* test dynamic client registration in Login
* comment oidc_static_clients
* register oidc inside Login.getFlows
* strict fixes
* remove unused code
* and imports
* comments
* comments 2
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* OidcRegistrationClientMetadata type
* navigate to oidc authorize url
* exchange code for token
* navigate to oidc authorize url
* navigate to oidc authorize url
* test
* adjust for js-sdk code
* login with oidc native flow: messy version
* tidy
* update test for response_mode query
* tidy up some TODOs
* use new types
* add identityServerUrl to stored params
* unit test completeOidcLogin
* test tokenlogin
* strict
* whitespace
* tidy
* unit test oidc login flow in MatrixChat
* strict
* tidy
* extract success/failure handlers from token login function
* typo
* use for no homeserver error dialog too
* reuse post-token login functions, test
* shuffle testing utils around
* shuffle testing utils around
* i18n
* tidy
* Update src/Lifecycle.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* tidy
* comment
* update tests for id token validation
* move try again responsibility
* prettier
* use more future proof config for static clients
* test util for oidcclientconfigs
* rename type and lint
* correct oidc test util
* store issuer and clientId pre auth navigation
* adjust for js-sdk changes
* update for js-sdk userstate, tidy
* update MatrixChat tests
* update tests
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* test util for oidcclientconfigs
* rename type and lint
* correct oidc test util
* store issuer and clientId pre auth navigation
* update for js-sdk userstate, tidy
* add delegatedauthentication to validated server config
* dynamic client registration functions
* test OP registration functions
* add stubbed nativeOidc flow setup in Login
* cover more error cases in Login
* tidy
* test dynamic client registration in Login
* comment oidc_static_clients
* register oidc inside Login.getFlows
* strict fixes
* remove unused code
* and imports
* comments
* comments 2
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* OidcRegistrationClientMetadata type
* navigate to oidc authorize url
* navigate to oidc authorize url
* test
* adjust for js-sdk code
* update test for response_mode query
* use new types
* strict
* tidy
* Use new `CryptoEvent.VerificationRequestReceived` event
https://github.com/matrix-org/matrix-js-sdk/pull/3514 deprecates
`CryptoEvent.VerificationRequest` in favour of
`CryptoEvent.VerificationRequestReceived`. Use the new event.
* Factor out `getDeviceCryptoInfo` function
I seem to be writing this logic several times, so let's factor it out.
* Factor out `getUserDeviceIds` function
Another utility function
* VerificationRequestToast: `getStoredDevice` -> `getDeviceCryptoInfo`
* SlashCommands: `getStoredDevice` -> `getDeviceCryptoInfo`
* MemberTile: `getStoredDevicesForUser` -> `getUserDeviceIds`
* Remove redundant mock of `getStoredDevicesForUser`
* add delegatedauthentication to validated server config
* dynamic client registration functions
* test OP registration functions
* add stubbed nativeOidc flow setup in Login
* cover more error cases in Login
* tidy
* test dynamic client registration in Login
* comment oidc_static_clients
* register oidc inside Login.getFlows
* strict fixes
* remove unused code
* and imports
* comments
* comments 2
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* OidcRegistrationClientMetadata type
* use registerClient from js-sdk
* use OidcError from js-sdk
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* add trailing slash
* comment error enum
* spacing
* PR tidying
* more comments
* add ValidatedDelegatedAuthConfig type
* Update src/Login.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Update src/Login.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Update src/utils/ValidatedServerConfig.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* rename oidc_static_clients to oidc_static_client_ids
* comment
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* force disable encryption on room creation
* test allowChangingEncryption
* move into utils/room directory
* tests
* unit test CreateRoomDialog
* remove debug
* wait for constructor promises to settle
* test case for force_disable
* comment
* set forced value after resolving checkUserIsAllowedToChangeEncryption
* tidy and comments
* use label text in test
* Speed up `waitForMember` if user already in room
`waitForMember` waits for a user to join, or be invited, to a room. But if the
user is already in the room (ie, we miss the `NewMember` event), we end up
timing out after 1500ms.
We can save 1.5s here by returning immediately.
* fix strict type errors
* stfu SonarCloud
* fix matrix search link
* fix matrix search link
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* fix: allow full link search
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* fix: allow full link search on new search feature
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* improve transformSearchTerm function
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* improve transformSearchTerm function
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* add review changes
* Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
added review correction
changed the transformSearchTerm function to use parsePermaLink
removed extra spaces
* add angle brackets to copyright email title
* removed extra space
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* Update src/utils/SearchInput.ts
Co-authored-by: Travis Ralston <travpc@gmail.com>
* fixed spolight dialog search for room and user links
* added tests for transformSearchTerm
* removed transformSearchTerm from room search bar
* replaces two test cases to one that should return the primaryEntityId if the search term was a permalink
* corrected ts issues
* changed type of transformSearchTerm to string
* changed return value from empty string to the original search term if the primaryEntityId of the parsedLink is null
* changed return value from empty string to the original search term if the primaryEntityId of the parsedLink is null
* refactored transformSearchTerm and added a new test case
* rewrote transformSearchTerm doc
* changed mocked return values of test case - should return the original search term if the search term is a permalink and the primaryEntityId is null
* lint corrections
---------
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
Co-authored-by: Boluwatife Omosowon <boluwatifeomosowon@Jesus-Loves-You.local>
Co-authored-by: Travis Ralston <travpc@gmail.com>
* Improve typing in constructor of RoomPermalinkCreator
* Provide via servers if present when navigating to predecessor room from Advanced Room Settings
* Show an error tile when the predecessor room is not found
* Test for MatrixToPermalinkConstructor.forRoom
* Test for MatrixToPermalinkConstructor.forEvent
* Display a tile for predecessor event if it contains via servers
* Fix missing case where event id is provided as well as via servers
* Refactor RoomPredecessor tests
* Return lost filterConsole to its home
* Comments for IState in AdvancedRoomSettingsTab
* Explain why we might render a tile even without prevRoom
* Guess the old room's via servers if they are not provided
* Fix TypeScript errors
* Adjust regular expression (hopefully) to avoid potential catastrophic backtracking
* Another attempt at avoiding super-liner regex performance
* Tests for guessServerNameFromRoomId and better implementation
* Further attempt to prevent backtracking
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Apply `strictNullChecks` to `src/utils/exportUtils`
* strict fix
* fix strictNullChecks issues in some utils
* fix error message
* test coverage
* lint
* more strictNullChecks
* small optimisation for getUniqueRoomsWithIndividuals
* tidy
* test coverage