Commit Graph

373 Commits

Author SHA1 Message Date
Andy Balaam
d49736455b Discard room key if someone leaves a room for a non-leave reason e.g. ban 2026-04-17 09:15:58 +01:00
Andy Balaam
e278a99a20 Factor out parts of test_history_share_on_invite_room_key_rotation 2026-04-17 09:15:58 +01:00
Ivan Enderlin
e69bb96144 test(integration): Fix the test_local_echo_to_send_event_has_encryption_info test.
This test forgot to subscribe to the Event Cache, hence the result
was partially okay. It was working by luck before. With the previous
commits, it was not possible to work without the Event Cache being
listening to the sync.
2026-04-14 14:45:14 +02:00
Damir Jelić
34a35ad32a feat(ffi): Allow passing in a SecretsBundle after logging in (#6212)
This allows people to get a secrets bundle out of band or out of a database and import it
after logging in a new client.

Mainly targeted to support the Element Classic -> Element X migration.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
Co-authored-by: Benoit Marty <benoitm@matrix.org>
2026-04-08 14:07:57 +00:00
Benjamin Bouvier
1fc7b34016 test: add an integration test reflecting the "bouncing" behavior of the timeline after sending an event 2026-04-01 14:59:33 +02:00
Kévin Commaille
34d5e6da2a Upgrade Ruma to commit after UserIdentifier breaking changes
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-01 10:20:21 +01:00
Damir Jelić
16c1b9b57f chore: Bump rand 2026-03-31 16:57:50 +02:00
Skye Elliot
be47a6435b tests: Add extra sync to history sharing session merge test
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-03-25 12:57:53 +00:00
Skye Elliot
fd806a9c11 tests: Assert room key rotated on leave event after being offline
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-03-18 14:25:22 +00:00
Skye Elliot
7a26db66b5 tests: Assert room key is rotated when a member leaves the room
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-03-18 14:25:22 +00:00
Benjamin Bouvier
f00f6103c8 fix(test): bump the wait time between room-info diffs in integration testing
`test_room_notification_count` started to intermittently fail on main,
because the computation of unread counts has moved from the sliding sync
processing to the event cache. As a result, new irrelevant RoomInfo
updates (related to the unread counts) can happen, and they might happen
quickly enough that the server reponse for sending an event happens
after 2 seconds (remember, we need to factor in the time to do the e2ee
key exchange, and so on and so forth).

Bumping the time between two RoomInfo updates should be sufficient to
avoid the intermittent failure.
2026-03-16 15:50:34 +01:00
Skye Elliot
b6c4bca5a0 Merge pull request #6275 from matrix-org/kaylendog/history-sharing/respect-visibility
feat(sdk): Only share history if room history visibility is shared
2026-03-12 14:55:15 +00:00
Benjamin Bouvier
9a257a4ca3 test(unread count): check that the unread counts get updated after event decryption 2026-03-12 13:28:13 +01:00
Skye Elliot
f7d818a8ba tests(sdk): Ensure shared history respects current history visibility
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-03-11 14:37:42 +00:00
Skye Elliot
f62fbfc4ee tests(sdk): Create helper assert_utd_with_withheld code
This commit additionally flips the order of a few assertions to
meet developer expectations, i.e. errors are reported as diffs
from expected.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-03-11 14:33:55 +00:00
rasmus
999d612a33 feat(sdk): add add_mentions toggle to Reply
Signed-off-by: rasmus <mail@rasmusantons.de>
2026-03-11 14:20:40 +01:00
Benjamin Bouvier
b0aadd1574 refactor(test): use assert_let_timeout more often
Many of our tests make use of `assert_let` for checking that some value
comes out of a stream, while they could use `assert_let_timeout`, which
provides better ergonomics when the expected value doesn't arrive
immediately, by failing quickly.

This converts a few instances, making those tests easier to debug in the
future, would they fail again.
2026-03-05 15:36:41 +01:00
Benjamin Bouvier
21e8138805 chore: depersonalize some TODO code comments
Removed a few TODOs that were not applicable anymore, because they were
either very low value (in timeline test code) or already done (in event
cache, with respect to the cross-process locking).

Also removed my nick from some TODOs and comments, as code comments
aren't the best way to store assignees for issues.
2026-03-05 13:35:23 +01:00
Benjamin Bouvier
0b6d00cfad Merge branch 'main' into bnjbvr/permalink-linked-chunk-backup 2026-03-03 15:49:13 +01:00
Damir Jelić
73028a834e chore: Define the MSRV in all of our private crates 2026-02-27 17:40:08 +01:00
Kévin Commaille
1dbd2caeb2 testing: Remove once_cell dependency
Use the types that were stabilized in the standard library instead.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-02-23 10:10:14 +00:00
Jorge Martín
54e4cb2d10 refactor: Rename CrossProcessStoreConfig into CrossProcessLockConfig, move it into matrix_sdk_common::cross_process_lock and use it inside CrossProcessLock instead of the previous lock_holder: Option<String> 2026-02-19 17:04:57 +01:00
Jorge Martín
287049c719 refactor: Rename CrossProcessStoreMode to CrossProcessStoreConfig 2026-02-19 17:04:57 +01:00
Jorge Martín
50b1e3baf2 refactor: Use the new APIs everywhere 2026-02-19 17:04:57 +01:00
Jorge Martín
3169c65bf2 refactor(ui): Make NotificationClient use the new CrossProcessStoreMode internally 2026-02-19 17:04:57 +01:00
Benjamin Bouvier
19c22a1883 fix(event cache): have redecryption update the event-focused caches too 2026-02-18 11:35:11 +01:00
Michael Goldenberg
d7c6af9677 test(notification-client): replace integration test with unit test
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-02-11 15:17:43 +01:00
Michael Goldenberg
b35bea6c2b test(notification-client): show room names wrong in sliding sync notifications
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-02-11 15:17:43 +01:00
Benjamin Bouvier
ee1eb99134 test: write a test for a UTD as the latest thread reply
The latest thread reply in a summary is UTD, then should be resolved
automatically. It doesn't, currently, so this test acts as a regression
test.
2026-02-11 14:56:38 +01:00
Benjamin Bouvier
59fd7530f9 test(event cache): declare victory \o/ 2026-02-05 16:43:25 +01:00
Benjamin Bouvier
fcf0b87489 chore: address typos and cosmetic changes in an integration test 2026-02-05 16:43:25 +01:00
Benjamin Bouvier
17840e52f5 refactor(timeline): start removing unused stuff in the timeline code
Now that this logic has moved to the event cache, it's not required in
the timeline anymore.
2026-02-05 16:43:25 +01:00
Benjamin Bouvier
50cc5f4102 refactor(pinned events): move pin_event/unpin_event from the Timeline to the Room
These make sense in general, and they will help getting rid of one of
the `PinnedEventsRoom` trait methods in a subsequent PR.
2026-02-04 09:59:47 +01:00
Johannes Marbach
2ebab067b4 feat(timeline): enable focusing a thread root using TimelineFocus::Event
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2026-01-28 07:43:49 +01:00
Skye Elliot
831ab6d429 tests: Check historic room keys fetched from backup.
- Splits `test_secret_gossip_after_interactive_verification ` into a helper method.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-01-13 15:47:02 +00:00
Skye Elliot
a5b1231f8c refactor: Deduplicate shared history test code to helper methods. 2026-01-06 16:18:33 +00:00
Skye Elliot
bfdd3ccc07 test: Ensure forwarder info is not available on unshared events. 2026-01-06 15:00:33 +00:00
Skye Elliot
6fdd83478a tests: Ensure forwarder info accessible via high-level API. 2026-01-06 12:59:54 +00:00
Damir Jelić
972b3dc88b test: Add a test which showcases that redecryption for timelines with an event focus is broken (#5975)
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2025-12-17 11:38:08 +00:00
Damir Jelić
504d15f171 chore: Fix some spelling issues 2025-12-16 15:46:34 +01:00
Damir Jelić
1302afb844 test: Add another test for pinned timelines
This time we're testing the redecryption of pinned events that were not
part of the main timeline, more importantly we never backpaginated
enough for them to be part of the main timeline and thus never got put
into the event cache.

This test expectedly fails for now.
2025-12-16 15:46:34 +01:00
Damir Jelić
7323c79dc2 test: Refactor the pinned timeline integration test a bit
This should allow us in the future to create more such tests with
many more events.
2025-12-16 15:46:34 +01:00
Damir Jelić
329bdaa785 test(timeline): Add a test that pinned events get replaced after they get redecrypted 2025-12-16 15:46:34 +01:00
Damir Jelić
9bdd2ae977 test: Ensure that the test_enabling_backups_retries_decryption test times out 2025-12-15 14:43:43 +01:00
Damir Jelić
9ff90a9b4d Add an integration test that the send queue can insert encrypted events 2025-12-09 18:49:03 +01:00
Stefan Ceriu
98f34f010c change(room::futures): Use a proper struct instead of a tuple for SendMessageLikeEvent results 2025-12-09 18:49:03 +01:00
Stefan Ceriu
8bd401b003 change(matrix_sdk::Room): Return the used EncryptionInfo when sending MessageLike and RawMessageLike events 2025-12-09 18:49:03 +01:00
Ivan Enderlin
81a8aa063b chore(base): Remove the old latest event API. 2025-12-05 09:40:47 +01:00
Ivan Enderlin
aaff9c5d72 test: Update tests according to last patches. 2025-12-03 13:11:40 +01:00
Richard van der Hoff
60072b3456 Integ test for merging megolm sessions with history sharing
Add an integration test that checks that, when we receive a copy of a megolm
session directly after having previously received it via history sharing, we
get the best bits of both.
2025-11-13 18:37:18 +00:00