Commit Graph

110 Commits (189796208602156c655b1a187854d3a1de61c4db)

Author SHA1 Message Date
Richard van der Hoff 6fd46f3bc8
`CreateSecretStorageDialog`: stop using deprecated APIs (#11635)
* Add some tests for `CreateSecretStorageDialog`

* CreateSecretStorageDialog: stop using deprecated APIs
2023-09-22 11:03:05 +00:00
Dominik Henneke 60bed46014
Add an action to upload media files according to MSC4039 (#11311)
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
2023-09-21 19:03:22 +00:00
maheichyk 86e86ba49f
Show knock rooms in the list (#11573)
* Show knock rooms in the list

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Pass userId to IndexedDBStore

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Revert "Pass userId to IndexedDBStore"

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Code review changes

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

---------

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
2023-09-19 11:24:35 +00:00
Michael Telatynski 99e80dd296
Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
Michael Telatynski 3c52ba0c92
Use Intl to localise dates and times (#11422)
* Use Intl to generate better internationalised date formats

* Get `Yesterday` and `Today` from Intl also

* Correct capitalisation blunder

* Fix formatTime include weekday

* Iterate

* Fix tests

* use jest setSystemTime

* Discard changes to cypress/e2e/settings/general-user-settings-tab.spec.ts

* Discard changes to res/css/_components.pcss

* Discard changes to res/css/views/elements/_LanguageDropdown.pcss

* Discard changes to src/components/views/elements/LanguageDropdown.tsx

* Add docs & tests for getDaysArray & getMonthsArray

* Discard changes to test/components/structures/__snapshots__/MatrixChat-test.tsx.snap

* Consolidate consts

* Improve testing & documentation

* Update snapshot

* Apply suggestions from code review

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

* Iterate

* Clarify comments

* Update src/DateUtils.ts

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

* Specify hourCycle

* Discard changes to test/components/views/settings/devices/DeviceDetails-test.tsx

* Update comments

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-08-21 19:38:59 +00:00
Travis Ralston 180fcaa70f
Support Matrix 1.1 (drop legacy r0 versions) (#9819)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-14 09:25:13 +01:00
Michael Telatynski ef385e6028
Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
Michael Telatynski 033c600fa2
Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
Michael Telatynski 24703eea8f
Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
Charly Nguyen 5152aad059
Allow knocking rooms (#11353)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-08-07 06:27:09 +00:00
Michael Telatynski d405160080
Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity (#11222)
* Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity

* Tweak copy

* Iterate

* Add tests

* Improve variable naming

* Improve coverage
2023-07-27 09:21:20 +00: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
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 328db8fdfd
OIDC: Check static client registration and add login flow (#11088)
* 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>
2023-06-22 10:15:44 +00:00
Richard van der Hoff 8570f16e31
Fix access to deprecated methods in `SetupEncryptionStore` (#11107)
* Fix access to deprecated methods in `SetupEncryptionStore`

* Updte tests

* more tests
2023-06-19 22:20:14 +00:00
Florian Duros 77da949fd4
`CreateKeyBackupDialog.tsx`: Remove logic for servers which are not supporting cross-signing (#11076) 2023-06-16 13:25:24 +01:00
Michael Telatynski 7236e48765
Allow maintaining a different right panel width for thread panels (#11064)
* Move Room context threadId our of RoomView state

* Allow maintaining a different right panel width for thread panels

* Fix types

* Fix types

* Add tests

* Increase coverage

* Increase coverage

* Add comments

* Update src/components/structures/MainSplit.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-06-15 11:57:58 +00:00
Michael Telatynski 6b46d6e4f8
Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
Michael Telatynski b6b9ce3c46
When joining room in sub-space join the parents too (#11011)
* When joining room in sub-space join the parents too

* Fix joined state not updating on sync

* Add membership check

* Update tests

* Improve coverage

* Make TS happier

* Make TS happier
2023-06-01 12:35:47 +00:00
Michael Weimann b5727cb463
Include thread replies in message previews (#10631)
* Include thread replies to message previews

* Extend tests

* Fix type issue

* Use currentColor for thread icon

* Fix long room name overflow

* Update snapshots

* Fix preview

* Fix typing issue

* Fix type issues

* Tweak thread reply detection

* Extend tests

* Fix type issue

* Fix test
2023-06-01 07:53:48 +00:00
Michael Weimann 4e5687c454
Send correct receipts when viewing a room (#10864)
* Send correct receipts when viewing a room

* Fix strict type issues

* Handle promises

* Handle more primises

* Add generic array type

* Replace existende check with type predicate

* Fix wrong variable check

* Improve comment about initial read marker

* Use read_markers API for fully read receipts

* Log public receipt fallback

* Rename variables in new code to be aligned to the spec

* Add end-2-end test for read markers and receipts
2023-05-15 16:06:02 +00:00
Robin 87e2274ae7
Enable pagination for overlay timelines (#10757)
* Update @types/jest to 29.2.6

This adds the correct types for the contexts field on mock objects, which I'll need shortly

* Enable pagination for overlay timelines
2023-05-12 16:27:41 +00:00
Florian Duros 5328f6e5fe
Element-R: Populate device list for right-panel (#10671)
* Use `getUserDeviceInfo` instead of `downloadKeys` and `getStoredDevicesForUser`

* Use new `getUserDeviceInfo` api in `UserInfo.tsx` and `UserInfo-test.tsx`

* Fix missing fields

* Use `getUserDeviceInfo` instead of `downloadKeys`

* Move `ManualDeviceKeyVerificationDialog.tsx` from class to functional component and add tests

* Fix strict errors

* Update snapshot

* Add snapshot test to `UserInfo-test.tsx`

* Add test for <BasicUserInfo />

* Remove useless TODO comment

* Add test for ambiguous device

* Rework `<BasicUserInfo />` test
2023-04-26 10:23:32 +00:00
Florian Duros db40479910
Element-R: Starting a DMs with a user (#10673)
* Use `cli.getUserDeviceInfo` instead of `cli.downloadKeys` to create a room

* Use `client.getCrypto().getUserDeviceInfo` instead of `client.getUserDeviceInfo`

* Update `createRoom-test.ts` to use `getUserDeviceInfo`

* Remove duplicate  field
2023-04-24 14:19:08 +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 70b87f8bde
Simplify `isDeviceVerified` definitions (#10594)
* Simplify `isDeviceVerified` definitions

Currently, we have two similar but different definitions of `isDeviceVerified`,
and they both do a lot of wrangling that relies on js-sdk internals. We can
simplify it a lot by just calling `MatrixClientPeg.checkDeviceTrust`.

* fix tests

* more test fixes
2023-04-14 09:46:37 +00:00
Kerry 81a4498a8f
Apply `strictNullChecks` to `src/utils/*!exportUtils` (#10455
* 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
2023-04-03 09:26:55 +01:00
Patrick Cloke 5c47142dab
Prep for matrix-js-sdk supporting intentional mentions. (#10431)
Add a method to the fake MatrixClient used in tests for compatibility with
changes in matrix-org/matrix-js-sdk#3092. This stops the downstream tests
from failing on that PR.
2023-03-22 16:22:19 -04:00
Michael Weimann 3eb6a55b93
Tweak pill UI (#10417) 2023-03-22 13:27:24 +01:00
Dominik Henneke ef68650594
Implement MSC3973: Search users in the user directory with the Widget API (#10269)
* Add an action to search for users in the user directory according to MSC3973

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Fix linter errors

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Update the matrix-widget-api package to version 1.3.0

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Improve the test

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

---------

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
2023-03-21 11:38:41 +00:00
Michael Weimann 96d1b74ffc
Pillify event permalinks (#10392) 2023-03-21 10:23:20 +01:00
Michael Weimann a86a8e7f8e
Pillify permalinks to rooms and users (#10388) 2023-03-16 15:01:09 +01:00
Michael Weimann ad26925bb6
Refactor pill and add tests (#10304) 2023-03-08 13:06:50 +01:00
Michael Telatynski ad8d27d2b2
Fix some features not being configurable via `features` (#10276) 2023-03-03 13:31:51 +00:00
Michael Weimann ffa047be68
Find DMs with pending third-paty invites (#10256) 2023-03-02 09:44:12 +01:00
Michael Telatyński f40d15388c
Update tests to prefer RTL over Enzyme (#10247
* Update tests to prefer RTL over Enzyme

* Strict types
2023-02-28 08:58:23 +00:00
Michael Weimann 880428ab94
Update „new device“ toast texts and buttons (#10200) 2023-02-23 10:25:33 +01:00
Michael Weimann eb6278df1d
Do not prompt for a password when doing a „reset all“ after login (#10208) 2023-02-23 08:46:49 +01:00
Germain 8c22584f64
Remove threads labs flag and the ability to disable threads (#9878) 2023-02-20 14:46:07 +00:00
Michael Weimann 8feed1a225
Try to resolve emails before creating a DM (#10164) 2023-02-16 14:17:43 +01:00
Clark Fischer 431afaafc6
Unify unread notification state determination (#9941)
* Add tests for unread notification facilities

Add some tests to guarantee some consistency in `useUnreadNotifications` and
`RoomNotificationState`.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Add RoomNotifs#determineUnreadState

Intended as a singular replacement for the divergent implementations before.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Unify room unread state determination

Have both the class-based facility and the hook use the new unified logic in
`RoomNotifs#determineUnreadState`.

Addresses https://github.com/vector-im/element-web/issues/24229

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

---------

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-01-31 09:58:17 +00:00
Clark Fischer 4c1e4f5127
Fix "[object Promise]" appearing in HTML exports (#9975)
Fixes https://github.com/vector-im/element-web/issues/24272
2023-01-30 14:31:32 +00:00
Germain 3e2bf5640e
Update to supportsThreads (#9907) 2023-01-30 12:20:11 +00:00
Andy Balaam 32bd350b7e
Tests for AdvancedRoomSettingsTab (#9994)
* Sort the methods in mkStubRoom

* Tests for AdvancedRoomSettingsTab
2023-01-27 11:00:06 +00:00
Michael Weimann 32140855fb
When deleting a voice broadcast, also delete related events (#9737) 2022-12-23 15:44:01 +00:00
Timo ce75d3381f
Pass analyticsID to the elementCall iFrame (#9637)
Co-authored-by: Robin <robin@robin.town>
Co-authored-by: Timo K <timok@element.io>
2022-12-22 12:09:57 +00:00
Michael Weimann b81582d045
Improve live voice broadcast detection by testing if the started event has been redacted (#9780) 2022-12-22 10:37:07 +00:00
Richard van der Hoff dc29317445 Improve display of edited events 2022-12-20 11:19:47 +00:00
Richard van der Hoff 9901219194 rip out unused mkPresence
it only serves to make the strict type checker complain
2022-12-17 23:52:54 +00:00
Michael Weimann 51554399fb
Implement broadcast message preview (#9762) 2022-12-16 11:01:16 +00:00