* 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
* Settings panels: avoid exceptions with rust crypto
If we are using rust crypto, `client.crypto` is undefined. We'll need to fix
these up better in future, but for now, just return early.
* Update tests
* 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>
* basic navigation to focused poll
* add tooltip
* drill permalinkCreator down to poll history
* render poll tile and link to timeline
* tidy and lint
* unit test poll detail
* add view poll link to ended pollliste item
* strict fix
* pr improvements
* pass room as prop
* permalinkcreator ts assertion
* wip
* remove dupe
* use poll model relations in all cases
* update mpollbody tests to use poll instance
* update poll fetching login in pinned messages card
* add pinned polls to room polls state
* add spinner while relations are still loading
* handle no poll in end poll dialog
* strict errors
* render a poll body that errors for poll end events
* add fetching logic to pollend tile
* extract poll testing utilities
* test mpollend
* strict fix
* more strict fix
* strict fix for forwardref
* add filter component
* update poll test utils
* add unstyled filter tab group
* filtertabgroup snapshot
* lint
* update test util setupRoomWithPollEvents to allow testing multiple polls in one room
* style filter tabs
* test error message for past polls
* sort polls list by latest
* extract poll option display components from pollbody
* add ended poll list item component
* use named export for polllistitem
* test POllListItemEnded
* comments
* strict fixes
* extract poll option display components
* strict fixes
* strict
* wip
* remove dupe
* use poll model relations in all cases
* update mpollbody tests to use poll instance
* update poll fetching login in pinned messages card
* add pinned polls to room polls state
* add spinner while relations are still loading
* handle no poll in end poll dialog
* strict errors
* render a poll body that errors for poll end events
* add fetching logic to pollend tile
* extract poll testing utilities
* test mpollend
* strict fix
* more strict fix
* strict fix for forwardref
* add filter component
* update poll test utils
* add unstyled filter tab group
* filtertabgroup snapshot
* lint
* update test util setupRoomWithPollEvents to allow testing multiple polls in one room
* style filter tabs
* test error message for past polls
* sort polls list by latest
* move FilterTabGroup into generic components
* comments
* Update src/components/views/dialogs/polls/types.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Apply suggestions from code review
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>
* wip
* remove dupe
* use poll model relations in all cases
* update mpollbody tests to use poll instance
* update poll fetching login in pinned messages card
* add pinned polls to room polls state
* add spinner while relations are still loading
* handle no poll in end poll dialog
* strict errors
* render a poll body that errors for poll end events
* add fetching logic to pollend tile
* extract poll testing utilities
* test mpollend
* strict fix
* more strict fix
* strict fix for forwardref
* update poll test utils
* implicit anys
* tidy and add jsdoc
* add settings while under development
* very basic tests for roomsummarycard
* empty poll history dialog and option in room summary
* pollS history in settings
* render an ugly list of polls in current timeline
* readonly poll history list items
* fix scroll window
* use short year code in date format, tidy
* no results message + tests
* strict fix
* mock intldatetimeformat for stable date formatting
* extract date format fn into date-utils
* jsdoc
* 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>
* Use js-sdk imports for poll event types instead of events-sdk
* Attempt to appease some tsc --strict errors
* Manually create poll response in cypress test
* Factor out `MessageEvent.from()` usage
The class/function is disappearing from the events-sdk, at least in this form.
* Manually create contents for events used by cypress
The utility function is out of range of the calling code at runtime, for some reason.
* Run prettier
* Maybe this will fix the build
* Fix call splitbrains when switching between rooms
Mounting CallView causes the user's call membership room state to be cleaned up. However, because the GroupCall object always thought the local device was disconnected from the call, it would remove the local device from room state when the clean method is called, causing a splitbrain. This uses GroupCall's new enteredViaAnotherSession field to fix that, and also simplify participant tracking.
* Remove clean tests that have been moved to matrix-js-sdk
* Use native js-sdk group call support
Now that the js-sdk supports group calls natively, our group call implementation can be simplified a bit. Switching to the js-sdk implementation also brings the react-sdk up to date with recent MSC3401 changes, and adds support for joining calls from multiple devices. (So, the previous logic which sent to-device messages to prevent multi-device sessions is no longer necessary.)
* Fix strings
* Fix strict type errors
* Fix bug with message context menu
* fix bug where ThreadSummary failed if no last reply is available
* Fix relations direction API
* Use same API for threads as for any other timeline
* Determine if event belongs to thread on jumping to event
* properly listen to thread deletion
* Add thread redaction tests
* Add fetchInitialEvent tests
* Paginate using default TimelinePanel behaviour
* Remove unused threads deleted code
Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Germain <germains@element.io>
* Add support for include_old_rooms and by_notification_level
* Include subspaces when apply spaces filter
* Remove stray is_tombstoned
* tests: add SlidingRoomListStore jest tests; update proxy version in cypress
* Add additional tests
* Additional tests
* Linting
* Update test/stores/room-list/SlidingRoomListStore-test.ts
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Support for login + E2EE set up with QR
* Whitespace
* Padding
* Refactor of fetch
* Whitespace
* CSS whitespace
* Add link to MSC3906
* Handle incorrect typing in MatrixClientPeg.get()
* Use unstable class name
* fix: use unstable class name
* Use default fetch client instead
* Update to revised function name
* Refactor device manager panel and make it work with new sessions manager
* Lint fix
* Add missing interstitials and update wording
* Linting
* i18n
* Lint
* Use sensible sdk config name for fallback server
* Improve error handling for QR code generation
* Refactor feature availability logic
* Hide device manager panel if no options available
* Put sign in with QR behind lab setting
* Reduce scope of PR to just showing code on existing device
* i18n updates
* Handle null features
* Testing for LoginWithQRSection
* Refactor to handle UIA
* Imports
* Reduce diff complexity
* Remove unnecessary change
* Remove unused styles
* Support UIA
* Tidy up
* i18n
* Remove additional unused parts of flow
* Add extra instruction when showing QR code
* Add getVersions to server mocks
* Use proper colours for theme support
* Test cases
* Lint
* Remove obsolete snapshot
* Don't override error if already set
* Remove unused var
* Update src/components/views/settings/devices/LoginWithQRSection.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update src/components/views/auth/LoginWithQR.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Update res/css/views/auth/_LoginWithQR.pcss
Co-authored-by: Kerry <kerrya@element.io>
* Use spacing variables
* Remove debug
* Style + docs
* preventDefault
* Names of tests
* Fixes for js-sdk refactor
* Update snapshots to match test names
* Refactor labs config to make deployment simpler
* i18n
* Unused imports
* Typo
* Stateless component
* Whitespace
* Use context not MatrixClientPeg
* Add missing context
* Type updates to match js-sdk
* Wrap click handlers in useCallback
* Update src/components/views/settings/DevicesPanel.tsx
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Wait for DOM update instead of timeout
* Add missing snapshot update from last commit
* Remove void keyword in favour of then() clauses
* test main paths in LoginWithQR
Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Kerry <kerrya@element.io>
* conversation export named after room
* sanitization added for exported file name
* sanitization added for exported file name
* sanitization added for exported file name
* sanitization added for exported file name=>lint error fixed
* sanitization added for exported file name=>lint error fixed
* sanitization added for exported file name=>redundancy removed
* sanitization added for exported file name=>redundancy removed
* reverted to previous commit
* sanitization added for exported file name=>redundancy removed
* exported chat date iso formatted
* conversation export named after room
* conversation export named after room
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* code refacto filename date format
* Add docs to fn
* Bring in a util library for sanitizing
* Extract file naming function and make consistent for all 3 types
Also use the library we dragged in
* Write tests & associated fixes
* Apply linters locally
* Include new date util in index
Co-authored-by: Sinharitik589 <sinharitik18112835@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: yaya-usman <yayaazeez222@gmail.com>
Co-authored-by: Sinharitik589 <67551927+Sinharitik589@users.noreply.github.com>
* silence call ringers when local notifications are silenced
* more coverage for silencing
* explain disabled silence button
* lint
* increase wait for modal
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>