Commit Graph

2333 Commits (689089d9e615dd457932a0f9714bb131496031a3)

Author SHA1 Message Date
Kerry 689089d9e6
Jest test coverage for `Lifecycle.persistCredentials` (#11243)
* test persistCredentials without a pickle key

* test setLoggedIn with pickle key

* lint

* type error

* rest restore session with pickle key
2023-07-19 07:40:40 +00:00
Michael Telatynski 58db307cf2
Update jest snapshot (#11293) 2023-07-18 14:33:46 +00:00
RiotRobot 5881df3f41 Merge branch 'master' into develop 2023-07-18 13:33:41 +01:00
RiotRobot 22fcd34c60 Sanitise strings going into the html export CVE-2023-37259 2023-07-18 13:23:27 +01:00
Michael Telatynski d9d0b84152
Revert "Do not filter users post search (#9556)" (#11288) 2023-07-18 09:26:54 +01:00
Maximilian Malek f1db2b3687
Do not filter users post search (#9556)
* Do not filter users post search

Signed-off-by: Maximilian Malek <maximilian.malek@uni-graz.at>

* Iterate

* Iterate

---------

Signed-off-by: Maximilian Malek <maximilian.malek@uni-graz.at>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-17 15:31:38 +00:00
Michael Telatynski 9fcd1f2434
Remove reply fallback from notifications (#11278)
* Remove reply fallback from notifications

* Add test
2023-07-17 14:04:09 +00:00
Michael Telatynski 8f000384fe
Replace sinon fake timers with jest timers (#11275) 2023-07-17 12:29:51 +00:00
Michael Telatynski f04a0e2860
Populate info.duration for audio & video file uploads (#11225)
* Improve m.file m.image m.audio m.video types

* Populate `info.duration` for audio & video file uploads

* Fix tests

* Iterate types

* Improve coverage

* Fix test

* Add small delay to stabilise cypress test

* Fix test idempotency

* Improve coverage

* Slow down

* iterate
2023-07-17 12:07:58 +00:00
Michael Telatynski 8b8ca425d7
Hide widget menu button if it there are no options available (#11257)
* Hide widget menu button if it there are no options available

* Update snapshots
2023-07-17 10:37:07 +00:00
Michael Telatynski 3ccc0fd8df
Increase timeout for wysiwyg composer test due to wasm being slow in CI (#11267) 2023-07-17 08:17:35 +00:00
Šimon Brandner cb03aac4cf
Switch to the new `session` API for screen-sharing (#11266)
See https://github.com/electron/electron/pull/30702 - this has the benefit of the js-sdk and LiveKit not having to add custom logic for Electron

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-07-14 20:51:24 +00:00
Michael Telatynski d38819ce9a Fix missing metaspace notification badges (#11269)
* Fix missing metaspace notification badges

* Simplify conditional types

(cherry picked from commit cdffd1ca1f)
2023-07-14 15:05:11 +00:00
Michael Telatynski 2760bfc836
Prevent user from accidentally double clicking user info admin actions (#11254)
* Prevent user from accidentally double clicking user info admin actions

* Iterate

* Improve coverage

* Improve coverage

* Simplify

* Simplify
2023-07-14 14:48:20 +00:00
Michael Telatynski cdffd1ca1f
Fix missing metaspace notification badges (#11269)
* Fix missing metaspace notification badges

* Simplify conditional types
2023-07-14 14:40:59 +00:00
Michael Telatynski 63bdd84c94
Offer to unban user during invite if inviter has sufficient permissions (#11256)
* 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>
2023-07-14 13:26:02 +00:00
Michael Telatynski 86d3ec8154
Split join and goto slash commands, the latter shouldn't auto_join (#11259)
* Split join and goto slash commands, the latter shouldn't auto_join

* i18n

* Add tests

* Iterate

* Improve coverage
2023-07-14 11:20:59 +00:00
Richard van der Hoff e959eca354
Fix corrupt thread timeline for sending events (#11260)
Events which are still in the process of being sent should *not* be included
in the `EventTimeline`. Doing so means that we will attempt to render them
twice, which makes react explode.

Fixes https://github.com/vector-im/element-web/issues/25770
2023-07-14 10:59:55 +00:00
Michael Telatynski cb592dc709
Fix clicking MXID in timeline going to matrix.to (#11263)
* Fix clicking MXID in timeline going to matrix.to

* Add tests

* Increase coverage
2023-07-14 10:55:55 +00:00
Michael Telatynski f5f31eb7d8
Fix jest/valid-expects lints (#11238) 2023-07-13 15:19:44 +00:00
Richard van der Hoff 2cfbd73cd3
Replace `getQRCodeBytes` with `generateQRCode` (#11241)
* Replace `getQRCodeBytes` with `generateQRCode`

* another test update

* remove obsolete snapshot
2023-07-13 13:55:55 +00:00
Kerry c5befa1ef8
Stabilize support for MSC3952: intentional mentions (#10967)
* enable feature_intentional_mentions with v1.7

* org.matrix.msc3952.mentions -> m.mentions

* update push rules test util

* only support stable version 1.7

* use stable values for msc3952 push rules

* use stable intentional mentions rule sin test models

* unstable feature in settings controller
2023-07-11 22:29:54 +00:00
Michael Telatynski a8f632ae19
Warn when demoting self via /op and /deop slash commands (#11214)
* Warn when demoting self via /op and /deop slash commands

* Iterate and DRY

* i18n

* Improve coverage

* Improve coverage

* Improve coverage

* Iterate
2023-07-11 12:53:33 +00:00
Janne Mareike Koschinski b179f5562e
GYU: Fix issues with audible keywords without activated mentions (#11218) 2023-07-11 10:38:26 +00:00
Kerry 7b3d0ad209
OIDC: Log in (#11199)
* 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>
2023-07-11 04:09:18 +00:00
Timo 58710d129d
Autoapprove Element Call oidc requests (#11209)
* autoapprove Element Call oidc requests

Signed-off-by: Timo K <toger5@hotmail.de>

* update comment

Signed-off-by: Timo K <toger5@hotmail.de>

* add tests for oidc element-call

Signed-off-by: Timo K <toger5@hotmail.de>

* fix ES lint

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
2023-07-10 15:06:58 +00:00
Charly Nguyen fd749172e1
Allow creating knock rooms (#11182)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-07-10 08:01:03 +00:00
Kerry 01bd80fe59
OIDC: update to `oidc-client-ts` functions from js-sdk (#11193)
* 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
2023-07-10 00:57:16 +00:00
Travis Ralston 8a97e5f351
Expose and pre-populate thread ID in devtools dialog (#10953)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-07 15:40:25 +01:00
Michael Telatynski cfd48b36aa
Enable strictPropertyInitialization (#11203) 2023-07-07 14:46:12 +01:00
Aaron Raimist 71fe08ea0f
Change wording from avatar to profile picture (#7015)
* Change wording from avatar to profile picture

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* lint

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* Update EventListSummary

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* Delete MembershipEventListSummary.tsx

Signed-off-by: Aaron Raimist <aaron@raim.ist>

* delint

* Update tests

---------

Signed-off-by: Aaron Raimist <aaron@raim.ist>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-07 10:54:43 +00:00
Michael Telatynski 118ee89f9e
Fix TimelinePanel-test over-driving Thread model into compliance (#11198) 2023-07-07 09:48:06 +01:00
Michael Telatynski 285847560b
Conform more of the codebase to strict typing (#11195) 2023-07-07 09:02:13 +01:00
Enrico Schwendig 902263d7c9
force to allow calls without video and audio in embedded mode (#11131)
* force to allow calls without video and audio in embedded mode

* Check device access permission and introduce a only screen share call mode

* Fix strict typ check issue

* Fix i18n check issue

* Add unit tests for device selection

* Fix mocked media device query
2023-07-06 14:40:14 +00:00
Johannes Marbach d7677c7e21
Handle newlines in user pills (#11166)
* Handle newlines in user pills

Fixes: vector-im/element-web#10994

* Fix typo in comment

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Refactor link generation for better readability

* Use `<br>` instead of `<br/>`

* Fix copy/paste error

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-07-05 22:00:27 +00:00
Johannes Marbach 3f20675b93
Limit width of user menu in space panel (#11192)
Fixes: vector-im/element-web#22627
2023-07-05 22:00:03 +00:00
Michael Telatynski 8107f1d271
Conform more of the codebase to strict types (#11191) 2023-07-05 11:53:22 +01:00
Kerry 90e65e8490
use more future proof config for static clients (#11175) 2023-07-04 23:10:03 +00:00
Kerry ce332d0f8b
Fix: hide unsupported login elements (#11185)
* hide unsupported login elements

* Update src/components/structures/auth/Login.tsx

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>
2023-07-04 22:15:35 +00:00
Germain 2a7780052e
Compound Typography pass regression fixes (#11189)
* Compound Typography pass regression fixes

* updates to the room list sizing

* fix subtitle clipping

* revert display name to use medium variant
2023-07-04 16:54:28 +00:00
Michael Telatynski a294ba2ad4
Conform more of the codebase to strictNullChecks + noImplicitAny (#11179) 2023-07-04 14:49:27 +01:00
Janne Mareike Koschinski f62fe2626c
GYU: Account Notification Settings (#11008)
* Implement new notification settings UI

* Sort new keywords at the front

* Make ts-strict happier

* Make ts-strict happier

* chore: fixed lint issues

* update beta card

* Fix issue with the user settings test

* chore: fixed lint issues

* Add tests for notification settings

* chore: fixed lint issues

* fix: spurious text failures

* improve tests further

* make ts-strict happier

* improve tests further

* Reduce uncovered conditions

* Correct snapshot

* even more test coverage

* Fix an issue with inverted rules

* Update res/css/views/settings/tabs/_SettingsIndent.pcss

Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Fix license headers

* Improve i18n

* make linters happier

* Improve beta labels

* improve i18n

* chore: fixed lint issues

* fix: more lint issues

* Update snapshots to match changed text

* Update text as requested

* Remove labs image

* Update snapshots

* Correct an issue with one of the tests

* fix: keyword reconcilation code

* Determine mute status more accurately

* Address review comments

* Prevent duplicate updates

* Fix missing license header

* slight change to avoid ts-strict complaining

* fix test issue caused by previous merge

---------

Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
2023-06-29 15:46:31 +00:00
Germain 9c7d935aae
Compound Typography pass (#11103)
* Integrate compound design tokens

The icons should not be included in this repo, and should live in the compound design token repo, but for simplicity sake at this phase of the integration they will be added here

* Delete unused or incorrect - sass variables

* Typography pass

* Deprecate _font-weights.pcss and use Compound instead

* lint fix

* Fix snapshot

* Fix typography pass feedback

* Remove unwanted e2e test

cypress tests should test functionality not visual output. And we should not test visual output by inspecting CSS properties

* lintfix

* Migration script for baseFontSize

* Updates after design review

* Update font scaling panel to use min/max size

* Fix custom font

* Fix font slider e2e test

* Update custom font

* Update new baseFontSizeV2

* Disambiguate heading props

* Fix appearance test

* change max font size

* fix e2ee test

* fix tests

* test baseFontSize migration code

* typescript strict

* Migrate baseFontSize account setting

* Change assertion for font size

* Fix font size controller test
2023-06-29 10:30:25 +00:00
Kerry 3f04e41c21
OIDC: navigate to authorization endpoint (#11096)
* 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
2023-06-28 21:08:56 +00:00
Michael Weimann c0db739d81
Apply `strictNullChecks` to `src/components/views/spaces/*` (#10517)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-28 15:39:19 +01:00
Michael Telatynski 209f5bdf33
Consider the empty push rule actions array equiv to deprecated dont_notify (#11155)
* Consider the empty push rule actions array equiv to deprecated dont_notify

* Switch primary tests to empty actions, add test for dont_notify

* strict types
2023-06-28 14:07:02 +00:00
Michael Telatynski 6836a5fa7b
Conform more code to `strictNullChecks` and `noImplicitAny` (#11156) 2023-06-28 14:05:36 +01:00
Richard van der Hoff 46eb34a55d
Kill off references to deprecated `getStoredDevice` and `getStoredDevicesForUser` (#11152)
* 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`
2023-06-28 12:39:34 +00:00
Kerry a87362a048
Unit test token login flow in `MatrixChat` (#11143)
* test tokenlogin

* whitespace

* tidy

* strict
2023-06-27 23:45:11 +00:00
Michael Telatynski e1cad41bc3
Conform more of the codebase to strictNullChecks (#11134) 2023-06-27 17:39:56 +01:00