Commit Graph

14571 Commits

Author SHA1 Message Date
Ivan Enderlin
d291be4235 chore(sdk): Move handle_joined_room_update from RoomEventCacheInner to RoomEventCache.
The idea of this patch is to make `RoomEventCache::inner` private. This
is required to achieve that goal.
2026-02-27 12:49:31 +01:00
Ivan Enderlin
1342daf381 chore(sdk): Move handle_left_room_update from RoomEventCacheInner to RoomEventCache.
The idea of this patch is to make `RoomEventCache::inner` private. This
is required to achieve that goal.
2026-02-27 12:49:31 +01:00
Ivan Enderlin
07f9e998e9 doc(sdk): Add missing, or fix existing documentation. 2026-02-27 12:49:31 +01:00
Ivan Enderlin
a9f946d365 chore(sdk): Fix the visibility of several symbols.
This patch simplifies a lot of `pub(in super::…)` to just `pub`. The
visibility is now defined by the type itself, onto which the methods
are implemented.
2026-02-27 12:49:31 +01:00
Ivan Enderlin
248b65d2d5 chore(sdk): Extract RoomEventCacheState into caches/room/state.rs. 2026-02-27 12:49:31 +01:00
Ivan Enderlin
500a637bc4 chore(sdk): Extract RoomEventCacheSubscriber to its own subscriber module.
Purely code move, except the addition of `RoomEventCacheSubscriber::new`
to keep data isolated.
2026-02-27 12:49:31 +01:00
Hugh Nimmo-Smith
7da0d903e5 refactor: remove QRCodeGrantLoginError::UnableToCreateDevice and HumanQrGrantLoginError::UnableToCreateDevice 2026-02-27 11:40:27 +01:00
Hugh Nimmo-Smith
3cf4faec83 feat(ffi): additional HumanQrGrantLoginError enum values 2026-02-27 11:40:27 +01:00
Hugh Nimmo-Smith
2cfd53e64d feat(qr-login): additional QRCodeGrantLoginError enum values 2026-02-27 11:40:27 +01:00
Ivan Enderlin
bbdfe7b38f chore(sdk): Move RoomEventCache in caches/room/mod.rs. 2026-02-26 11:39:40 +01:00
Ivan Enderlin
b4977bbe5d chore(sdk): Move EventLinkedChunk in caches/event_linked_chunk.rs. 2026-02-26 11:39:40 +01:00
Ivan Enderlin
4bc4263e1c chore(sdk): Move ThreadEventCache in caches/thread/mod.rs. 2026-02-26 11:39:40 +01:00
Ivan Enderlin
ef734e0876 chore(sdk): Move PinnedEvents in caches/pinned_events/mod.rs. 2026-02-26 11:39:40 +01:00
Damir Jelić
a2881d5aca ci: Update our benchmarks workflow
This switches to OICD for authentication as recommended by the docs:
    https://codspeed.io/docs/integrations/ci/github-actions/configuration#oidc-recommended

Also switch to simulation mode as the instrumentation mode got renamed to
it.
2026-02-26 11:03:27 +01:00
Richard van der Hoff
a90cf28d3c Merge pull request #6199 from matrix-org/rav/history_sharing/invite_details_in_crypto_store
Move `invite_acceptance_details` out of `RoomInfo` and into crypto store
2026-02-25 15:16:51 +00:00
Ivan Enderlin
aa11e9f062 fix(xtask): Fix a broken gap in the fields grid of overview. 2026-02-25 16:03:57 +01:00
Ivan Enderlin
4d9268d104 fix(xtask): Fix an infinite loop when parsing the fields of a span.
The error was coming from the subslice from `message` instead of
`fields`.

This patch also fixes an HTML error (`</li>` right after `<ul>`).
2026-02-25 16:03:57 +01:00
Benoit Marty
b7b96d49c5 fix(ui): Check if an Event is redacted before trying to decrypt it. (#6203)
Check if an Event is redacted before trying to decrypt it.

Use a new enum `NotificationStatus.EventRedacted` when trying to resolve
an event for a notification.

PR done with the help of AI: GitHub copilot chat in VisualStudio.

I confirm that the fix is working in EXA with the code in
https://github.com/element-hq/element-x-android/pull/6241

Fixes #5796

<!-- description of the changes in this PR -->

- [x] I've documented the public API Changes in the appropriate
`CHANGELOG.md` files.
- [x] I've read [the `CONTRIBUTING.md`
file](https://github.com/matrix-org/matrix-rust-sdk/blob/main/CONTRIBUTING.md),
notably the sections about Pull requests, Commit message format, and AI
policy.
- [x] This PR was made with the help of AI.

<!-- Sign-off, if not part of the commits -->
<!-- See CONTRIBUTING.md if you don't know what this is -->
Signed-off-by: benoitm@element.io
2026-02-25 15:02:13 +00:00
Skye Elliot
37823df753 feat(crypto): Add room_id to RoomPendingKeyBundleDetails 2026-02-25 14:54:14 +00:00
Richard van der Hoff
096dd59c07 Add comments on race conditions 2026-02-25 14:47:56 +00:00
Richard van der Hoff
13fb3e76c5 base: switch from storing invite acceptance details in RoomInfo to crypto store 2026-02-25 14:27:18 +00:00
Richard van der Hoff
8e614c23eb base: pass the e2ee context into update_{knocked,invited}_room
... for consistency with `update_{left,joined}_room`, and because we will need
it shortly
2026-02-25 14:26:02 +00:00
Richard van der Hoff
f324191c7f base: pull logic for clearing invite acceptance details up to higher level
Previously, invite acceptance details were cleared in `RoomInfo::set_state`. We
can't do that any more, because (a) that method is synchronous (b) it doesn't
have access to the crypto store (c) it would be a bit of a layering violation
even if it did.

Instead, we pull the logic up to higher-level methods which do have access to
the crypto store (though, for now, we don't use it).
2026-02-25 14:23:14 +00:00
Richard van der Hoff
dc66994d66 sdk: make should_accept_bundle async
We're going to need to call async methods here, so prepare for it by making it
async
2026-02-25 14:23:14 +00:00
Richard van der Hoff
8ac5d42fbe crypto: add rooms_pending_key_bundles interface to crypto store
Add a place to store details about rooms where we are waiting for a key bundle
2026-02-25 14:23:14 +00:00
Richard van der Hoff
8f14ee976a crypto: Move InviteAcceptanceDetails to matrix-sdk-crypto, and rename
Step two in a series of refactoring: move and rename
`matrix_sdk_base::InviteAcceptanceDetails` to
`matrix_sdk_crypto::store::types::RoomPendingKeyBundleDetails`.

We're going to store this in the crypto store instead, so need to move it
down. I also want to rename it to better reflect how we interpret it.
2026-02-25 14:23:14 +00:00
Richard van der Hoff
da92379e22 base: gate RoomInfo::invite_acceptance_details behind e2e-encryption
This field is only ever used when encryption is enabled, and we want to move it
to the crypto crate. So, for a starting point, gate it behind the
e2e-encryption feature flag.
2026-02-25 14:23:14 +00:00
Ivan Enderlin
0cbe48e986 feat(xtask): Add cargo xtask log timer.
This patch adds a new `timer` command. It helps to visualise the
`timer!` log in a table with their duration.
2026-02-25 15:15:36 +01:00
Ivan Enderlin
99bfb94d6d fix(xtask): Fix an expect message. 2026-02-25 15:15:36 +01:00
Ivan Enderlin
3aa424117c fix(xtask): Fix a CSS custom property naming error. 2026-02-25 15:15:36 +01:00
Ivan Enderlin
4160192709 refactor(common): Add the “Timer” prefix to timer!'s message.
The idea of adding the “Timer” prefix is to ease parsing the logs: it
gives an anchor for a regex engine (e.g. `Timer _[^_]+_ finished in`).
2026-02-25 15:15:36 +01:00
Richard van der Hoff
6bc09cbbd9 refactor(base): pass references to e2ee context instead of cloning
`matrix_sdk_base::response_processors::e2ee::E2EE` exists to pass E2EE context to the
logic within `response_processors`. Currently we pass it around by value in
many places, and hence have repetitive code for building the context, as well
as lots of calls to `.clone`.

Cloning of this type is cheap, but we can do better, by passing it around by
reference instead.
2026-02-25 15:07:27 +01:00
Doug
6c18f73b51 chore: Use multi-process lock config as the signal for enabling the OIDC cross process lock.
# Conflicts:
#	bindings/matrix-sdk-ffi/CHANGELOG.md
2026-02-24 18:11:18 +02:00
Ivan Enderlin
a8e4630f56 chore(sqlite): Update deadpool to 0.13 and deadpool-sync to 0.2.
These releases include our patch to fix a panic (see
https://github.com/deadpool-rs/deadpool/pull/461).
2026-02-24 16:26:45 +01:00
Ivan Enderlin
45d16919a0 doc(ffi,sdk): Add #6174 in the CHANGELOG.md. 2026-02-24 14:08:23 +01:00
Ivan Enderlin
9fc10e90a3 doc(sdk): Add #6174 to the CHANGELOG.md. 2026-02-24 14:08:23 +01:00
Ivan Enderlin
d00aa2ccd2 feat(sdk): Introduce RoomEventCache::thread_pagination. 2026-02-24 14:08:23 +01:00
Ivan Enderlin
79155bb59b refactor(sdk): Implement ThreadPagination based on Pagination. 2026-02-24 14:08:23 +01:00
Ivan Enderlin
2f26e346ed chore(sdk): Move the pagination.rs module to caches/room/pagination.rs. 2026-02-24 14:08:23 +01:00
Ivan Enderlin
2d32096534 refactor(sdk): Re-implement RoomPagination with the new Pagination type. 2026-02-24 14:08:23 +01:00
Ivan Enderlin
73814c5be0 refactor(sdk): Introduce the Pagination type along with the PaginatedCache trait. 2026-02-24 14:08:23 +01:00
Ivan Enderlin
e84e83c716 doc(sdk): Fix internal doc.
This patch moves a doc paragraph from one method to another. It was
misplaced.
2026-02-24 14:08:23 +01:00
Ivan Enderlin
0edff99390 refactor(sdk): Add waited_for_initial_prev_token in LoadMoreEventsBackwardsOutcome::Gap.
This patch adds the `waited_for_initial_prev_token` field directly
inside `LoadMoreEventsBackwardsOutcome::Gap`. It removes the need
to manage the `state_guard` manually (which can be error-prone). It
also removes one access to the `state_guard` in the pagination module.
Finally, it paves the road for a shared `Pagination<C>` type for
`RoomEventCache` and `ThreadEventCache`.
2026-02-24 14:08:23 +01:00
Ivan Enderlin
cdd7be13f1 refactor(sdk): Rename RoomPaginationStatus to PaginationStatus.
This patch renames the `RoomPaginationStatus` enum to `PaginationStatus`
because it won't be restricted to the `RoomEventCache` only: indeed, the
`ThreadEventCache` will soon be able to yield it too. Let's do the
renaming now.
2026-02-24 14:08:23 +01:00
Ivan Enderlin
9729e633f2 chore(sdk): Promote a debug! to error! when an HTTP request fails.
This patch increases a log from `debug` to `error` when an HTTP request
fails. This is an error, and it must appear as such in the logs.
2026-02-24 13:28:47 +01:00
dependabot[bot]
f796232220 chore(deps): bump tj-actions/changed-files from 47.0.2 to 47.0.4
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 47.0.2 to 47.0.4.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v47.0.2...v47.0.4)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: 47.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-24 13:28:29 +01:00
dependabot[bot]
13d46e6aeb chore(deps): bump CodSpeedHQ/action from 4.10.6 to 4.11.0
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.10.6 to 4.11.0.
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](4deb3275dd...2ac5728517)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-24 13:27:56 +01:00
Kévin Commaille
6c75571c38 crypto: Avoid dereferencing to clone identifier
The code was dereferencing to the borrowed type, only to convert it
back to an owned type. We can just use `.clone()` for this.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
matrix-sdk-ffi/20260224
2026-02-24 13:09:55 +01:00
Benjamin Bouvier
ec719bbb6b refactor(send queue): monitor the send queue background task 2026-02-23 18:55:31 +02:00
Benjamin Bouvier
f3cb3c7317 refactor(utd hook): monitor the background task for the UTD hook reporting 2026-02-23 18:55:31 +02:00