Commit graph

35045 commits

Author SHA1 Message Date
Michael Telatynski
dd7479accb
Merge branch 'develop' of github.com:element-hq/matrix-react-sdk into t3chguy/wat/230.1
# Conflicts:
#	src/components/views/settings/CryptographyPanel.tsx
#	test/components/views/settings/tabs/user/__snapshots__/SecurityUserSettingsTab-test.tsx.snap
2024-09-25 17:02:32 +01:00
Michael Telatynski
ad94c39e50
Fix accessible label on left panel spotlight trigger (#87)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-25 10:01:38 +00:00
Richard van der Hoff
2e895da39f
Crypto: fix display of device key (#86)
* CryptographyPanel: fix display of device key

* CryptographPanel: Fix HTML nesting

you're not supposed to put <tr> directly inside <table>; doing so causes
warnings.

* Update tests
2024-09-24 15:48:37 +00:00
Michael Telatynski
3620c5ac62
Merge branch 'develop' into t3chguy/wat/230.1 2024-09-24 10:34:36 +01:00
Andrew Ferrazzutti
ef1d4f6c12
Grant Element Call widget capabilities for "raise hand" feature (#82)
* Grant Element Call widget caps for "raise hand"

This allows the widget to send and receive event types used by the
"raise hand" feature (element-hq/element-call#2542) without prompting
the user to grant the capabilities to do so.

* Lint
2024-09-23 10:40:40 +00:00
David Langley
1f5571062e
Mobile registration optimizations and tests (#62)
* Mobile registration optimizations

- don't autocaptialize or autocorrect on username field
- show each password field in their own row
- improve position of tooltip on mobile so that it's visible

* Use optional prop rather than default prop.

* Redirect to welcome screen if mobile_registration is requested but not enabled in the config.

* autocorrect value should be "off"

* Add unit tests for mobile registration

* Fix test typo

* Fix typo
2024-09-20 11:24:39 +00:00
Florian Duros
fe657027bd
Update to use non deprecated methods to decode recovery key (#54)
* Replace `MatrixClient.keyBackupKeyFromRecoveryKey` by `decodeRecoveryKey`

* Replace `MatrixClient.isValidRecoveryKey` by local check with `decodeRecoveryKey`

* Replace old `decodeRecoveryKey` import

* Remove `matrix-js-sdk/src/crypto/recoverykey` import of  eslint exception

* Add tests for `RestoreKeyBackupDialog`
2024-09-19 15:39:20 +00:00
Florian Duros
490746e56a
Update to use non deprecated methods to derive key from passphrase (#55)
* Replace `deriveKey` call by `deriveRecoveryKeyFromPassphrase`

* Remove `matrix-js-sdk/src/crypto/key_passphrase` import of eslint exception
2024-09-19 13:41:11 +00:00
Florian Duros
4776f87775
Ignore chat effect when older than 48h (#48)
* Ignore effect later than 48h

* Add tests for `EffectsOverlay-test.tsx`
2024-09-19 09:39:32 +00:00
David Langley
154bf33fa1
Manually clear orphaned recaptcha challenge overlay in android webviews (#53)
* try manually clear any left over recaptcha overalys

* add alert to debug webview

* disable settings check for netlify build

* Update fix for removing challenge, as g-recaptcha-bubble-arrow is now always shown

* Remove alert for debugging webview

* Put back requirement for config setting and make sure it redirects to welcome if not present.

* Add comment to explain bodge.

* Remove unrelated code
2024-09-18 16:56:18 +00:00
Michael Telatynski
7feb5a0b49
Merge branch 'develop' into t3chguy/wat/230.1 2024-09-18 11:21:55 +01:00
Florian Duros
13e67ae0eb
Add Release announcement for the pinning message list (#46)
* Add RA for the pinning message list

* Update RoomSummaryCard-test.tsx snapshot

* Update RA labels
2024-09-18 09:26:17 +00:00
Florian Duros
59852773ad
Unlabs feature pinning (#22) 2024-09-16 14:51:59 +00:00
David Langley
20a4f0af99 Enforce config setting 2024-09-16 15:16:24 +01:00
David Langley
3d89fc3bf2 Merge branch 'develop' of https://github.com/element-hq/matrix-react-sdk into langleyd/mobile_registeration 2024-09-16 13:46:33 +01:00
David Langley
62d66f9d91 Remove accidental paste 2024-09-13 16:59:50 +01:00
David Langley
0716434aa1 Allow hs_url as param on mobile_register 2024-09-13 16:59:11 +01:00
David Langley
a89f61a357 Add error text and title with server name 2024-09-13 14:48:48 +01:00
David Baker
9426fec8c7
Fix timeout type (#40)
In the user profile timezone code, which was failing a ts check.
2024-09-13 13:15:10 +00:00
Michael Telatynski
be59791db1
Add support for org.matrix.cross_signing_reset UIA stage flow (#34)
* Soften UIA fallback postMessage check to work cross-origin

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Do the same for the SSO UIA flow

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add support for `org.matrix.cross_signing_reset` UIA stage flow

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Check against MessageEvent::source instead

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* i18n

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove protected method

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-13 11:49:19 +00:00
David Langley
0244aaeb2f use window.dispatchEvent 2024-09-13 12:18:32 +01:00
David Langley
a6dec86374 Add mobile registration and dispatch event for mobile postmessage dance 2024-09-13 12:12:04 +01:00
Michael Telatynski
a6e98b0b63
Use strong over b for improved a11y semantics
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-09-13 12:09:41 +01:00
Florian Duros
6b384fe9c1
Fix huge usage bandwidth and performance issue of pinned message banner. (#37)
* Return only the first 100 pinned messages

* Execute pinned message 10 by 10
2024-09-13 07:47:22 +00:00
ElementRobot
0e8cd5badd
[create-pull-request] automated change (#38)
Co-authored-by: dbkr <dbkr@users.noreply.github.com>
2024-09-13 06:18:17 +00:00
Will Hunt
eae9d9e248
Add timezone to user profile (#20)
* [create-pull-request] automated change (#12966)

Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>

* Add timezone to right panel profile.

* Add setting to publish timezone

* Add string for timezone publish

* Automatically update timezone when setting changes.

* Refactor to using a hook

And automatically refresh the timezone every minute.

* Check for feature support for extended profiles.

* lint

* Add timezone

* Remove unintentional changes

* Use browser default timezone.

* lint

* tweaks

* Set timezone publish at the device level to prevent all devices writing to the timezone field.

* Update hook to use external client.

* Add test for user timezone.

* Update snapshot for preferences tab.

* Hide timezone info if not provided.

* Stablize test

* Fix date test types.

* prettier

* Add timezone tests

* Add test for invalid timezone.

* Update screenshot

* Remove check for profile.

---------

Co-authored-by: ElementRobot <releases@riot.im>
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-09-12 13:18:25 +00:00
Florian Duros
f31776378d
Reverse pinned message list (#19) 2024-09-12 12:43:07 +00:00
David Baker
a701e3afd7
Add config option to force verification (#29)
* Add config option to force verification

If this is set, users will not have the option to skip verification
on login (they will still be able to reload and continue unverified,
currently). Default off.

* Test for complete security dialog

* I hadn't set up prettier
2024-09-11 20:55:00 +00:00
Richard van der Hoff
433c14e5a9
Log clearer errors when picklekey goes missing (#27)
* tokens.ts: improve documentation

Improve variable naming and documentation on the methods in `tokens.ts`.

* rename restoreFromLocalStorage

Since the session data isn't actually stored in localstorage, this feels like a
misleading name.

* Lifecycle: bail out if picklekey is missing

Currently, if we have an accesstoken which is encrypted with a picklekey, but
the picklekey has gone missing, we carry on with no access token at all. This
is sure to blow up in some way or other later on, but in a rather cryptic way.

Instead, let's bail out early.

(This will produce a "can't restore session" error, but we normally see one of
those anyway because we can't initialise the crypto store.)
2024-09-11 15:13:04 +00:00
Florian Duros
03004a55fd
Change settings to true by default (#25) 2024-09-11 11:16:52 +00:00
Florian Duros
07125f554d
Remove release announcement of new header (#23) 2024-09-11 09:17:44 +00:00
David Langley
491f0cd08a
Change license (#13)
* Copyright headers 1

* Licence headers 2

* Copyright Headers 3

* Copyright Headers 4

* Copyright Headers 5

* Copyright Headers 6

* Copyright headers 7

* Add copyright headers for html and config file

* Replace license files and update package.json

* Update with CLA

* lint
2024-09-09 13:57:16 +00:00
David Baker
c26ce7a0dd
Merge branch 'develop' into dbkr/changelog_repos 2024-09-09 09:57:32 +01:00
dbkr
0acc7dd540 [create-pull-request] automated change 2024-09-09 06:03:18 +00:00
David Baker
f8da257769 Update repos for changelog fetching 2024-09-06 14:08:23 +01:00
Florian Duros
08d1b6ceae
Add analytics event for pinned messages 2024-09-05 16:56:18 +02:00
Florian Duros
5bfbca9eb0
Migrate all pinning checks and actions into PinningUtils (#12964) 2024-09-05 14:37:24 +00:00
Richard van der Hoff
649074273e
Log phases in the verification process (#12963)
When the EncryptionPanel (which does the work of the verification flow) changes
"phase", log it. I hope this will be helpful when diagnosing stuck
verifications.
2024-09-05 09:34:39 +00:00
Sahil Silare
cdffbdb81a
Add error handling for room publish toggle (#12941)
* feat: added error handling for room publish toggle

* chore: fixed the messages and removed `console.log`

* chore: added minor comment that was removed

* fix: addressed review comments

* fix: fixed linting
2024-09-05 09:01:10 +00:00
Florian Duros
1e3320da1e
Pinned message list: prevent sender name to overflow pinned event tile (#12947)
* Prevent sender name to overflow pinned event tile

* Add tooltip to display the sender name
2024-09-04 09:45:18 +00:00
Florian Duros
60fe70b3cc
Add a prefix to file, poll, image, video and audio in the pinned message banner (#12950)
* Move event preview to its own component

* Remove unused parameter

* Add prefix to file, audio, video and image in the pinned message banner

* Add prefix to poll in the pinned message banner

* Add tests
2024-09-04 09:07:19 +00:00
David Baker
6bfdb3e16b
Fix read receipt animation (#12923)
* Fix read receipt animation

The way it was done involved remembering dom nodes and then getting
their position later when animating the receipt to its next position,
but I'm not sure how this worked since the DOM node may not neccessarily
be in the DOM anymore. Instead, just remember the bounding box coordinates.
At worst it might go weird if the window is resized but seems fine in
practice. Also, keeping references to dom nodes feels like a fast road
to memory leaks.

Fixes https://github.com/element-hq/element-web/issues/27916

* Attempt to write a test for read receipts

and fix naming

* Another test

also change a condition to make it testable
2024-09-03 11:59:30 +00:00
Florian Duros
f033b64b53
Display the indicator even with one message in pinned message banner (#12946)
* Display the indicator even with one message

* Update e2e tests
2024-09-02 15:51:04 +00:00
Florian Duros
41686bba58
Always display last pinned message on the banner (#12945)
* Fix when an event is pinned and the banner displays the correct event.

Fix when an event is pinned and the banner displays the good event.

* Update e2e tests
2024-09-02 15:50:39 +00:00
Florian Duros
1ac533e730
Don't emit decrypted event for the banner (#12944) 2024-09-02 15:45:25 +00:00
Timshel
ae15bbe6e0
Allow user to set timezone (#12775)
* Allow user to set timezone

* Update test snapshots

---------

Co-authored-by: Florian Duros <florianduros@element.io>
2024-09-02 09:07:07 +00:00
Florian Duros
13ec19c22e
Sort the pinning message list in the same order than the banner (#12937) 2024-08-30 14:57:30 +00:00
Michael Weimann
19f8b44745
Implement download_file in widget driver (#12931)
* Implement download_file in widget driver

Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>

* Fix test URIs

Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>

* Use download-file branch as widget-api source

Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>

* bump matrix-widget-api to 1.9.0

Signed-off-by: Kim Brose <kim.brose@nordeck.net>

* prettier

Signed-off-by: Kim Brose <kim.brose@nordeck.net>

---------

Signed-off-by: Michael Weimann <michael.weimann@nordeck.net>
Signed-off-by: Kim Brose <kim.brose@nordeck.net>
Co-authored-by: Kim Brose <kim.brose@nordeck.net>
2024-08-30 14:45:25 +00:00
Florian Duros
d16ab09866
Display pinned messages on a banner at the top of a room (#12917)
* Move pinned message hooks to a dedicated file

* Add a banner at the top of a room to display the pinned messages

* Put the pinning banner behind labs pinning labs flag

* Add redacted event support

* Handle UTD in pinning message banner

* Add tests for redaction

* Make all the banner clickable

* Add tests for PinnedMessageBanner.tsx

* Add e2e tests for the pinned message banner

* Review changes
2024-08-29 14:26:10 +00:00
Florian Duros
ea3c5cf787
Fix pin/unpin slowness and non refresh from the message action bar (#12934)
* Improve PinningUtils.ts doc and use common methods to check pin or unpin.
Removed unused methods.

* Send room account data and state event in parallel

* Rerender MessageActionBar.tsx if there is a room pinned event

* Update pinning util tests

* Add test for room pinned events in MessageActionBar-test.tsx
2024-08-28 08:56:46 +00:00