Commit Graph

11766 Commits

Author SHA1 Message Date
Damir Jelić
59ecb1edbd fix(multiverse): Add a shortcut to mark rooms as read back 2025-04-23 11:39:59 +02: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
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
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
Ivan Enderlin
739f306bf0 refactor(base): Create the room::msc4186::extensions::room_account_data response processor.
This patch is twofold:

1. it transforms the `&mut` to a `&` for the room account data in the
   sliding sync flow, which allows to remove one big clone!
2. it adds the `room_account_data` response processor.
2025-04-15 14:17:07 +02:00
Ivan Enderlin
5f3c96607f refactor(base): Create the room::msc4186::extensions::ephemeral_events response processor.
This patch creates the new `room::msc4186::extensions::ephemeral_events`
response processor.

Ideally we would like to merge this with `ephemeral_events`, but they
are a bit different. Let's see how it evolves in the future.
2025-04-15 14:17:07 +02:00
Ivan Enderlin
235facb793 refactor(base): room::sync_v2::update_(joined|left)_room use room::Room.
This patch uses the `room::Room` structure in `room::sync_v2` to
reduce the number of arguments of the `update_joined_room` and the
`update_left_room` processors.
2025-04-15 14:17:07 +02:00
Ivan Enderlin
9adb0deaa5 refactor(base): room::msc4186::update_any_room uses room::Room.
This patch uses the `room::Room` structure in
`room::msc4186::update_any_room` to reduce its number of arguments. It
results in the removal of te `allow(clippy::too_many_arguments)`.
2025-04-15 14:17:07 +02:00
Ivan Enderlin
61b711ce76 chore(base): Create the room::Room structure.
This patch creates the `room::Room` structure to group common arguments
in the `room` processors.
2025-04-15 14:17:07 +02:00
Ivan Enderlin
9e6dc71609 refactor(base): Remove the BaseStateStore argument in room:sync_v2::* processors.
This patch removes the `BaseStateStore` argument in `room::sync_v2::*`
response processors as it can be fetched from the `Notification`
argument.
2025-04-15 14:17:07 +02:00
Ivan Enderlin
33b1c02873 chore(base): Rename room_data to room_response.
This patch tries to clarify that the `room_data` _is_ the HTTP response.
2025-04-15 14:17:07 +02:00