Commit Graph

13223 Commits

Author SHA1 Message Date
Richard van der Hoff
6d1c24f6fb test: attempt to deflake history-sharing test
Rather than attempting to trigger Alice's encryption sync loop with an incoming
message from Bob, instead have Alice send a message once Bob has joined the
room.
2025-04-23 11:33:06 +01:00
Richard van der Hoff
4300148663 test: factour out new helper wait_until_some. 2025-04-23 11:33:06 +01:00
Richard van der Hoff
75cde02283 Merge pull request #4946 from matrix-org/rav/history_sharing/share_on_invite
sdk: share room history when we send an invite, subject to an experimental feature flag.
2025-04-23 11:15:57 +01:00
Damir Jelić
59ecb1edbd fix(multiverse): Add a shortcut to mark rooms as read back 2025-04-23 11:39:59 +02:00
Richard van der Hoff
6e963917d6 sdk: clean up imports 2025-04-23 09:51:01 +01:00
Valere
7adf60d2c6 fixup: Cleaner ProcessedToDevice snapshot serialization 2025-04-22 16:30:53 +02:00
Valere
bd576c22c0 fixup: test, redact snapshot value that is dependent of feature flag 2025-04-22 16:30:53 +02:00
Valere
35023ceb0b fixup: invalid tag in doc 2025-04-22 16:30:53 +02:00
Valere
f1e7894c01 fixup: insta use shorter names 2025-04-22 16:30:53 +02:00
Valere
ef44631fc6 review: remove outdated changelog line 2025-04-22 16:30:53 +02:00
Valere
541586f6cc review: add snapshot test with proper redaction 2025-04-22 16:30:53 +02:00
Valere
f89150d3ee review: quick doc improvements 2025-04-22 16:30:53 +02:00
Valere
b27770801c review: refactor, rename NotProcessed variant to Invalid 2025-04-22 16:30:53 +02:00
Valere
a49bffac4c review: refactors ProcessedToDeviceEvent to tuple variants
Simplifies the `ProcessedToDeviceEvent` enum by converting its variants to tuple variants.

This change improves code readability and conciseness by removing the need for named fields within the variants.
2025-04-22 16:30:53 +02:00
Valere
d4a0c2882d review: Move ProcessedToDeviceEvent to crypto types mod 2025-04-22 16:30:53 +02:00
Valere
031f4ec329 review: Remove encryption_info. Will be part of another PR 2025-04-22 16:30:53 +02:00
Valere
4bf103db38 test: Add more olm decryption encryption_info tests 2025-04-22 16:30:53 +02:00
Valere
4363105976 crypto: Add variants for plain text and encrypted to-device events
fixup: post rebase
2025-04-22 16:30:53 +02:00
Doug
3b133865f0 chore: Remove unused contacts field from OidcConfiguration. 2025-04-22 16:25:07 +02:00
Richard van der Hoff
82a0708b4e SDK: rename confusing-named Room::query_keys_for_untracked_users
This also sends out the query for dirty users, so the name was misleading.
2025-04-22 15:19:51 +01:00
dependabot[bot]
3eafefcf37 chore(deps): Bump tj-actions/changed-files
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 9b4bb2bedb217d3ede225b6b07ebde713177cd8f to c34c1c13a740b06851baff92ab9a653d93ad6ce7.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](9b4bb2bedb...c34c1c13a7)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: c34c1c13a740b06851baff92ab9a653d93ad6ce7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 10:02:57 +02:00
Andy Balaam
d2874afb75 fix(integration-tests): Fixes #4871 (hopefully). Repeatedly sync in a test after other user cross-signs 2025-04-17 13:51:32 +02:00
Damir Jelić
a848506669 feat(multiverse): Add a /invite command 2025-04-17 12:03:51 +02:00
Damir Jelić
f0e49c2adf feat(multiverse): Render membership changes 2025-04-17 12:03:51 +02:00
Ivan Enderlin
74e2e767dd fix(base): Add RoomNotableUpdateReasons::NONE to… fix a possible regression.
This patch introduces a temporary hack.

So here is the thing. Ideally, we DO NOT want to emit this reason.
It does not makes sense. However, all notable update reasons
are not clearly identified so far. Why is it a problem? The
`matrix_sdk_ui::room_list_service::RoomList` is listening this stream
of [`RoomInfoNotableUpdate`], and emits an update on a room item if
it receives a notable reason. Because all reasons are not identified,
we are likely to miss particular updates, and it can feel broken.
Ultimately, we want to clearly identify all the notable update reasons,
and remove this one.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
3ec831f5da test(base): Update tests after the previous patch.
This patch updates the tests, which now break because of the previous
batch that fixes a bug.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
ab34330e47 fix(base): Do not emit an RoomInfoNotableUpdate with empty reasons.
In case an empty `RoomInfoNotableUpdateReasons` is empty, let's not send
a `RoomInfoNotableUpdate`.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
35e5cca3fb fix(base): room::display_name emits a RoomInfoNotableUpdateReasons::DISPLAY_NAME.
This patch updates the `room::display_name` response processor to emits
a `RoomInfoNotableUpdateReasons::DISPLAY_NAME`.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
80a7aadf9f feat(base): changes::save_only will also broadcast room info notable updates.
This patch changes the `changes::save_only` and
`changes::save_and_apply` response processors to both broadcast the
`RoomInfoNotableUpdates`.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
4837add55e test(base): Test that sliding sync persists the room (cached) display name. 2025-04-17 09:13:41 +03:00
Ivan Enderlin
abf0bbb1a6 fix(base): Use the room::display_name processor for sync v2.
This patch uses `room::display_name` and `changes::save_only` to compute
the new display name for all rooms and save them, for sync v2 only.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
c1d885f913 fix(base): Create the room::display_name response processor.
This patch creates the `room::display_name::update_for_rooms` response
processor. It also creates the `changes::save_only` response processor.
Finally, this patch uses both to compute the new display name for all
rooms and save them, for sliding sync only.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
568e60b434 refactor(base): Extract the “save” part of save_and_apply into its own function.
This patch extracts the “save” part of the `save_and_apply` response
processor into its own function. Thus we have `save_changes` (new) and
`apply_changes` that are used by `save_and_apply`.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
d05796d8cb task(base): Room::compute_display_name returns an UpdatedRoomDisplayName.
This patch updates `Room::compute_display_name` to return an
`UpdatedRoomDisplayName`. This is useful to know if the display name has
changed or not.
2025-04-17 09:13:41 +03:00
Ivan Enderlin
adb7cd33d1 task(base): Introduce UpdatedRoomDisplayName.
This patch introduces a new enum: `UpdatedRoomDisplayName`, which
will be used to know if a room display name is different or not when
computing the room display name.
2025-04-17 09:13:41 +03:00
Richard van der Hoff
18f20a7e29 sdk: only share history if cross-signing is set up
... otherwise, it fails with an error, which makes the integ tests fail
2025-04-16 16:53:31 +01:00
Richard van der Hoff
96bdd91bad sdk: share room history when we send an invite
... subject to an experimental feature flag.
2025-04-16 16:53:27 +01:00
Damir Jelić
bc50cae35f feat(multiverse): Add support to join rooms you've been invited to 2025-04-16 11:35:57 +02:00
Stefan Ceriu
d36b2a6869 feat(ffi): introduce a ThreadSummary type within MsgLikeContent (#4933)
…that holds information on the thread the given item is the root of

- it holds the latest event content and sender at the moment but will
hold more information in the future e.g. number of replies, if it's
unread etc.
- the field is not currently being populate but is delivered earlier so
it can power shipping the UI side on the embedders
matrix-sdk-ffi/20250422
2025-04-16 09:11:31 +03:00
Richard van der Hoff
ed232df0b6 Merge pull request #4864 from matrix-org/rav/history_sharing/upload_bundle
crypto: encrypt, upload and share keys for room history
2025-04-15 18:00:03 +01:00
Richard van der Hoff
1a4f6effda Merge branch 'main' into rav/history_sharing/upload_bundle
Signed-off-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-04-15 17:43:01 +01:00
Richard van der Hoff
dc6fe93d1e crypto: fix changelog for 0.10.0 and 0.11.0 (#4939)
PR #4670 didn't land until 0.11.0.
2025-04-15 17:12:32 +01:00
Benjamin Bouvier
a5537a8f24 fix(event cache): don't ditch a previous-batch token when we didn't have initial events (#4936)
See #4891 that shows a case where we should have saved the
previous-batch token, and instead ditched it, in the previous version.

Changes include:
- moving the code deciding to keep or ditch the `previous-batch` token
into `append_events_locked`.
- tweak the condition to ditch, so that the `previous-batch` token is
ditched only if we didn't have events in the event cache in the first
place, in addition to having storage + the timeline not being marked as
limited explicitly.

Credits to @zecakeh for the test case.
2025-04-15 15:29:11 +00:00
Benjamin Bouvier
a27d6e2655 multiverse: prefer rendering back-paginated events instead of timeline's tail
This is useful to observe the virtyual start of timeline item in manual
testing.
2025-04-15 16:31:20 +02:00
Richard van der Hoff
bce6c19bba Merge branch 'main' into rav/history_sharing/upload_bundle
Signed-off-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-04-15 14:32:42 +01:00
Ivan Enderlin
22d092b83c chore(base): Rename ephemeral_events to dispatch_ephemeral_events. 2025-04-15 14:17:07 +02:00
Ivan Enderlin
ee5671bef5 chore(base): Rename Room to RoomCreationData. 2025-04-15 14:17:07 +02:00
Ivan Enderlin
0b58b9112d chore(base): Make Clippy happy. 2025-04-15 14:17:07 +02:00
Ivan Enderlin
0fed5147b9 chore(base): Use Entry::or_default() to simplify code. 2025-04-15 14:17:07 +02:00
Ivan Enderlin
b06234149f chore(base): Fix imports and e2e-encryption. 2025-04-15 14:17:07 +02:00