* 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>
* 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`
* 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>
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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.
* 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>
* 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>