Commit Graph

14146 Commits

Author SHA1 Message Date
Benjamin Bouvier 387df77a6f fix(latest event): mark a failed but recoverable attempt to send as a sending
In the send queue, failures to send can be classified into two
categories:

- permanent failures (e.g. invalid parameters)
- recoverable failures (e.g. network is down; server responded with a
  transient error code)

The latest event system would classify all the failures as "cannot be
sent", which is slightly incorrect if the failure was recoverable. In
this case, we should still consider the local event as being sent, as
the system should try to send it some time soon.
matrix-sdk-ffi/20260113
2026-01-12 16:36:10 +01:00
Benjamin Bouvier b9ef07a719 refactor: commonize two arms of a match 2026-01-12 16:36:10 +01:00
Benjamin Bouvier df49cbb44d refactor(test): deduplicate test helper related to local latest event 2026-01-12 16:36:10 +01:00
dependabot[bot] b1ca2bbbb5 chore(deps): bump crate-ci/typos from 1.40.0 to 1.41.0
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-12 13:28:00 +00:00
Ivan Enderlin ccbb7575c0 doc(base): Move an entry at its correct place. 2026-01-12 14:07:35 +01:00
Richard van der Hoff 5be3ea3d46 common: Fix up documentation on TimelineEvent
https://github.com/matrix-org/matrix-rust-sdk/pull/4568 merged together
`SyncTimelineEvent` and `TimelineEvent`, but removed some of the useful
documentation on `TimelineEvent`, and left behind some confusing
references. This change fixes it up.
2026-01-12 10:03:04 +01:00
Ivan Enderlin 7b16a32910 doc: Update CHANGELOG.mds. 2026-01-09 15:46:48 +01:00
Ivan Enderlin 7caac55580 chore(ui): RoomListService:subscribe_to_rooms replaces old subscriptions.
This patch changes `subscribe_to_rooms` in `RoomListService` to replace
the old subscriptions. It avoids accumulating subscriptions forever and
is closer to the old `visible_rooms` sliding sync list behaviour.
2026-01-09 15:46:48 +01:00
Ivan Enderlin f19249c47d feat(sdk): Add SlidingSync::(clear_and_subscribe|unsubscribe)_to_rooms.
This patch adds two methods on `SlidingSync`: `unsubscribe_to_rooms`
and `clear_and_subscribe_to_rooms` to respectively remove many room
subscriptions, and to replace room subscriptions by new ones.
2026-01-09 15:46:48 +01:00
Valere 6c067a7981 add changelog 2026-01-09 13:49:23 +01:00
Valere f2991134f2 test: Call intent serialization tests 2026-01-09 13:49:23 +01:00
Valere e39a23e5ae feat(call): Add new call intents for voice only 2026-01-09 13:49:23 +01:00
Richard van der Hoff eba2a57122 common: fix typos in changelog
Some typos in the #5959 changelog
2026-01-09 13:47:40 +01:00
Jorge Martín 7595ae0916 test(ffi): Add test for CreateRoomParameters -> create_room::v3::Request transformation 2026-01-09 12:08:56 +01:00
Jorge Martín faff2d70f8 feat(ffi): Add ffi::CreateRoomParameters::is_space
This allows us to create a room with a `RoomType::Space` from the clients
2026-01-09 12:08:56 +01:00
Ivan Enderlin f3aec8d33e doc(sdk): Remove 6002 as it's no more relevant. 2026-01-09 11:25:37 +01:00
Ivan Enderlin 632ca3f9bf chore(sdk): Sliding Sync room_subscriptions is definitely not sticky.
Our information were wrong. `room_subscriptions` is definitely not
sticky, we must send them for each request.

This patch removes `RoomSubscriptionState`. Subscriptions are not marked
as “applied” anymore, they are always sent.
2026-01-09 11:25:37 +01:00
Richard van der Hoff 97110edbe1 Merge pull request #6007 from matrix-org/kaylendog/history-sharing/changelog-fix
docs(common): Correct `ForwarderInfo` changelog entry.
2026-01-07 16:57:59 +00:00
Skye Elliot fbc0981e8d docs(common): Correct ForwarderInfo changelog entry.
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-01-07 16:10:24 +00:00
Jorge Martín 6b0c1e2992 doc: Add doc and inline comments 2026-01-07 16:11:40 +01:00
Jorge Martín c65026b70a doc: Add changelog entry 2026-01-07 16:11:40 +01:00
Jorge Martín b5a0042e14 fix(sqlite): Add WAL checkpoints to the DBs when they're opened too 2026-01-07 16:11:40 +01:00
Jorge Martín 3be6fb1a80 fix(sqlite): Add WAL checkpoints when vacuuming
For some reason, the automatic WAL checkpoints don't seem to be working as expected. Since we should periodically run VACUUM operations, we might as well add checkpoints before vacuuming (so the WAL size is reset and can grow to fit the whole DB) and after (so we clean up after that).
2026-01-07 16:11:40 +01:00
Ivan Enderlin 5dcd877dcd test(ui): Sticky parameters have been removed. 2026-01-07 14:05:59 +01:00
Ivan Enderlin ed1c847e7b doc(sdk): Update the `CHANGELOG.md. 2026-01-07 14:05:59 +01:00
Ivan Enderlin 87962d10e2 test(sdk): Test Request::extensions::to_device::since is set.
This patch restores a couple of assertions from a recently removed
test where it is asserted that `Request::extensions::to_device::since`
is set from the Olm machine.
2026-01-07 14:05:59 +01:00
Ivan Enderlin 4ac4ad3440 chore(sdk): Remove the sticky_parameters module.
This patch removes the `sticky_parameters` module, which is now unused.
2026-01-07 14:05:59 +01:00
Ivan Enderlin 742b6e5200 chore(sdk): Sliding Sync list filters is no longer sticky.
This patch extracts `SlidingSyncListStickyParameters::filters` to
no longer make it sticky. We are dropping sticky parameters as it's not
part of the last MSC.
2026-01-07 14:05:59 +01:00
Ivan Enderlin 43657d8302 chore(sdk): Sliding Sync list required_state is no longer sticky.
THis patch extracts `SlidingSyncListStickyParameters::required_state` to
no longer make it sticky. We are dropping sticky parameters as it's not
part of the last MSC.
2026-01-07 14:05:59 +01:00
Ivan Enderlin b28999e40c chore(sdk): Inline and always apply SlidingSyncStickyManager.
This patch removes `SlidingSyncStickyManager` as it only contains
the logic for a single request field: `room_subscriptions`. Also,
previously, `room_subscriptions` was considered sent based on the
transaction ID. This is useless as it's always sticky per MSC4186. The
logic from `SlidingSyncStickyManager` is sent inlined, allowing to
effectively remove this type.
2026-01-07 14:05:59 +01:00
Ivan Enderlin 42de8307bf chore(sdk): Sliding Sync extensions is no longer sticky.
This patch extracts `SlidingSyncStickyParameters::extensions` to no
longer make it sticky. We are dropping sticky parameters as it's not
part of the last MSC.
2026-01-07 14:05:59 +01:00
Jorge Martín 48d1d1f80f doc: Add changelog entry 2026-01-07 11:25:31 +01:00
Jorge Martín d52e5cfb50 doc: Add more doc comments to Client::fetch_client_well_known 2026-01-07 11:25:31 +01:00
Jorge Martín fe46a0cce0 fix(sdk): When using fetch_client_well_known_with_url, use the server name from the Client::user_id as a possible fallback too 2026-01-07 11:25:31 +01:00
ragebreaker b081654c51 fix(search): Create key dirs if they don't exist. (#5992)
The issue is related to the encrypt_store_dir fn where, when creating
the key file, it doesn't ensure that the parent directory exists first.
It might be not optimal for the user of the crate to ensure in an non
hacky manner, as the sdk iterates through most of its directories
internally. Have a test to verify it, which can be removed later (if
being merged)

Needs a review, might not be the optimal solution as this is my first pr
with the crate and am not that familiar with it (although do use it in
one of my apps).
2026-01-07 11:07:36 +01:00
Skye Elliot cc622a56ea Merge pull request #6000 from matrix-org/kaylendog/history-sharing/ui
Expose information about room key bundle forwarder in `matrix-sdk-ui` and `matrix-sdk-ffi`.
2026-01-06 16:40:10 +00:00
Skye Elliot a5b1231f8c refactor: Deduplicate shared history test code to helper methods. 2026-01-06 16:18:33 +00:00
Skye Elliot a8c9257dfe docs: Update CHANGELOGs. 2026-01-06 16:16:20 +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 503234976f refactor: Extract forwarder data fetcing to a helper function. 2026-01-06 14:28:44 +00:00
Skye Elliot 6fdd83478a tests: Ensure forwarder info accessible via high-level API. 2026-01-06 12:59:54 +00:00
Skye Elliot 0a5a22ec6f feat(ui): Expose information about room key bundle forwarder.
Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-01-06 12:15:27 +00:00
dependabot[bot] 21cad56213 chore(deps): bump CodSpeedHQ/action from 4.4.1 to 4.5.2
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.4.1 to 4.5.2.
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codspeedhq/action/compare/346a2d8a8d9d38909abd0bc3d23f773110f076ad...dbda7111f8ac363564b0c51b992d4ce76bb89f2f)

---
updated-dependencies:
- dependency-name: CodSpeedHQ/action
  dependency-version: 4.5.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 12:02:50 +01:00
Kévin Commaille b0a536aaeb Upgrade Ruma
Uses the newly released version.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-01-06 12:02:23 +01:00
Kévin Commaille 5ee379d588 fix(ui): Deduplicate aggregation local and remote echo
We can have 3 different states for the same aggregation in
related_events, in chronological order:

1. The local echo with a transaction ID.
2. The local echo with the event ID returned by the server after
   sending the event.
3. The remote echo received via sync.

The transition from states 1 to 2 was already handled in
`mark_aggregation_as_sent()`.
But the transition from states 2 to 3 was never handled and we ended up
with both the local echo and the remote echo in the related events.

This resulted in the local echo being chosen over the remote echo when
computing the latest edit only because it was first in the list, even
though it didn't contain the raw JSON of the edit.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-01-06 10:00:24 +00:00
Jonas Platte ebbf34e924 Fix more new clippy lints 2026-01-06 09:51:10 +00:00
Jonas Platte e4aff871de Refactor IndexeddbStateStore::save_changes 2026-01-06 09:51:10 +00:00
Jonas Platte 0a9994c529 Fix new clippy lints 2026-01-06 09:51:10 +00:00
Jonas Platte 06764e2542 Reformat matrix-sdk-indexeddb 2026-01-06 09:51:10 +00:00
Jonas Platte 84cd2a67d4 Upgrade matrix-sdk-indexeddb to Rust edition 2024 2026-01-06 09:51:10 +00:00