Commit Graph

14300 Commits

Author SHA1 Message Date
Doug
d5f09dffaa spaces: Fix an incorrect early return introduced at the last minute. 2025-11-24 17:37:33 +02:00
Johannes Marbach
ae9070815c fix(oauth): use ruma::time::instant for wasm compatibility
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-24 14:11:57 +01:00
Doug
f49c588ade spaces: Add a method to get the joined parents of a given child. 2025-11-24 14:57:21 +02:00
Doug
8e0dba641d spaces: Add methods to add/remove space children. 2025-11-24 14:57:21 +02:00
Damir Jelić
2f7d2b3b9b chore: Bump our sentry-tracing deps 2025-11-21 17:00:44 +01:00
Ivan Enderlin
d228bde8ef doc(ui): Merge a duplicated Refactor Section. 2025-11-21 16:17:09 +01:00
Ivan Enderlin
83a7d591bd doc(ui,ffi): Update CHANGELOG.md. 2025-11-21 16:17:09 +01:00
Ivan Enderlin
247bb4960e feat(ui,ffi): Add LatestEventValue::Local { sender, .. }.
This patch adds a `sender: OwnedUserId` field to
`LatestEventValue::Local` in `matrix_sdk_ui::timeline` (and the
corresponding `matrix_sdk_ffi` type).
2025-11-21 16:17:09 +01:00
Ivan Enderlin
83f9d74626 feat(ui,ffi): Add LatestEventValue::Local { profile, .. }.
This patch adds a `profile: TimelineDetails<Profile>` field to
`LatestEventValue::Local` in `matrix_sdk_ui::timeline` (and the
corresponding `matrix_sdk_ffi` type).
2025-11-21 16:17:09 +01:00
Damir Jelić
eed5f11f26 Merge pull request #5881 from matrix-org/poljar/event-cache/fix-race-condition
Fix a race condition in the redecryptor leading to missed decryption attempts
2025-11-21 15:22:00 +01:00
Damir Jelić
75a977cc47 ci: Free up disk space for the benchmark jobs as well 2025-11-21 14:18:22 +01:00
Damir Jelić
5b396d0b0d chore: Add a link to the github issue for why async-stream isn't bumped 2025-11-21 14:18:22 +01:00
Damir Jelić
7de210a88f chore: Update the deny.toml file
The adler crate is no longer in our tree, it has been replaced by the
adler2 crate.
2025-11-21 14:18:22 +01:00
Damir Jelić
127154fcfa chore: Bump our deps and update the Cargo.lock file 2025-11-21 14:18:22 +01:00
Kévin Commaille
0e46732ede Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-11-20 16:44:54 +00:00
Kévin Commaille
1352bd74d6 Upgrade Ruma
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-11-20 16:44:54 +00:00
Ivan Enderlin
762135ba22 doc(ui): Improve documentation of RoomListLoadingState.
This patch adds intra-links and clarifies a sentence about the room
type.
2025-11-20 14:40:48 +01:00
Damir Jelić
7a1fadddc3 doc(redecryptor): Document that we're listening to the event cache as well 2025-11-20 13:31:58 +01:00
Damir Jelić
f343c98b63 fix(redecryptor): Fix race a condition where events might not be redecrypted
This patch fixes a race condition where events won't get decrypted
because a room key arrives after the initial decryption attempt but
before the UTD has been persisted in the event cache.

The fix is relatively straightforward, we'd need a synchronization point
for the two different tasks, the event cache which adds events and the
redecryptor which listens to room keys to decrypt events.

A lock could have been used, so the storing and redecrypting of events
becomes synchronized via the storage layer. This approach could have
degraded performance since the event cache needs to handle a lot of
events.

The approach that was chosen here is to let the redecryptor listen to
updates coming from the event cache itself. If the event cache tells us
that it persisted a UTD, we will attempt to decrypt. Upon a successful
decryption we will replace the event in the cache as well.
2025-11-20 13:27:58 +01:00
Damir Jelić
fd4821c3ec refactor(redecryptor): Make the filter closure a function 2025-11-20 13:27:13 +01:00
Damir Jelić
5dea64b0ef feat(linked-chunk): Add method to get the items of an Update
This patch adds a convenience function for the Update enum. If one only
cares about the items contained in the Update, then they can chose to
use this method to extract them out of the enum.
2025-11-20 13:26:23 +01:00
Damir Jelić
2388acaf33 test(redecryptor): Add a test confirming a race condition in the redecryptor
This patch adds a test confirming that the redecryptor has a race
condition.

Namely, events and room keys are received over two different sync
streams from the homeserver. When events are received over the sync, we
first try to decrypt them, this might fail because the room key hasn't
yet arrived over the other sync stream. The event cache will then
persist the event as a UTD.

At the same time, the redecryptor will listen to room keys that arrive
on the other sync stream. Once the redecryptor gets notified about a
room key, it will attempt to fetch the event from the event cache to
decrypt the event and replace it.

Crucially if the key arrives before the event gets persisted but after
the initial decryption attempt we might never attempt to redecrypt such
an event.
2025-11-20 13:20:12 +01:00
Damir Jelić
91bc1ef28f test(redecryptor): Factor out common code in the redecryptor tests 2025-11-20 13:19:49 +01:00
Richard van der Hoff
b1eaa5edca sdk: improve logging for received history bundles
We had an instance where a user joined a room on Element X but did not download
the key bundle, so let's add some logging to help figure out what was going on.
2025-11-19 11:38:58 +01:00
Doug
0b5e1fb9c5 xtask: Add support for building watchOS targets. 2025-11-19 11:36:53 +01:00
Ivan Enderlin
2eb4323fe1 test(ui): Test long-polling in RoomListService.
This patch tests whether long-polling is used for Sliding Sync requests
made by `RoomListService`.
2025-11-19 10:39:11 +01:00
Ivan Enderlin
db806f6b8d test(ui): Simplify macro usage.
This patch declares the type of the expected value for `assert pos`.
2025-11-19 10:39:11 +01:00
Ivan Enderlin
64a51af18d feat(ui): Manually define when to do long-polling in the RoomListService.
This patch uses the newly introduced
`SlidingSyncListBuilder::requires_timeout` to define when the
`RoomListService` must apply a long-polling depending on its state
machine.
2025-11-19 10:39:11 +01:00
Ivan Enderlin
da52532b60 feat(sdk): Add SlidingSyncListBuilder::requires_timeout.
This patch adds a new `SlidingSyncListBuilder::requires_timeout` method
that takes a function deciding whether the list requires a timeout, i.e.
if the list should trigger a `http::Request::timeout`, i.e. if it
deserves a long-polling or not.

The default behaviour is kept for compatibility purposes.
2025-11-19 10:39:11 +01:00
Ivan Enderlin
f846eea7a3 doc(sdk): Update outdated documentation of SlidingSyncList::set_sync_mode.
This patch updates the documentation of `SlidingSyncList::set_sync_mode`
to remove an outdated reference to a `reset` method that no longer
exists.
2025-11-19 10:39:11 +01:00
Ivan Enderlin
475db3e640 refactor(sdk) Change RwLock<Observable> to SharedObservable.
This patch updates `SlidingSyncListInner::state` from a
`RwLock<Observable>` to a `SharedObservable`. It is semantically and
programmatically identical, but the API is simpler.
2025-11-19 10:39:11 +01:00
Damir Jelić
efe511e5e8 Merge pull request #5869 from matrix-org/poljar/event-cache/remove-timeline-redecrypion-logic 2025-11-19 10:31:32 +01:00
Damir Jelić
4ae82dd634 feat(bindings): Allow user identities to only be fetched from storage 2025-11-19 09:42:26 +01:00
Jorge Martin Espinosa
d860749f95 Revert "doc: Add warnings about overriding the server URL"
This reverts commit 95d8ba94e1.
matrix-sdk-ffi/20251118
2025-11-18 15:58:19 +01:00
Jorge Martin Espinosa
012a9825a4 Revert "refactor(ffi): Remove unused Session::homeserver_url value"
This reverts commit 4eb3cc9812.
2025-11-18 15:58:19 +01:00
Jorge Martín
1c22d0b25b doc: add changelogs 2025-11-18 12:26:30 +01:00
Jorge Martín
be86fe4aa9 doc: Improve doc comments
Also move `EventMeta::thread_root_id` next to `event_id`
2025-11-18 12:26:30 +01:00
Jorge Martín
385f7aa86d doc: Fix docs for ffi::Timeline::latest_event_id 2025-11-18 12:26:30 +01:00
Jorge Martín
5f996f77c6 reafactor(ffi): Have ffi::Timeline::latest_event_id use ui::Timeline::latest_event_id, instead of ui::Timeline::latest_event
This is important because `latest_event` would also return local events, which won't have an event id.
2025-11-18 12:26:30 +01:00
Jorge Martín
02491fc6ec test: Add test for TimelineController::latest_event_id 2025-11-18 12:26:30 +01:00
Jorge Martín
0f62ff991d fix clippy 2025-11-18 12:26:30 +01:00
Jorge Martín
6b245264e1 fix(test): Fix broken test locally: it was using a previous cached value before 2025-11-18 12:26:30 +01:00
Jorge Martín
f7b92c84e7 fix(ui): Sending read receipt in live timeline when latest event is in a thread
Previously, this used the latest event in the thread as the event to mark as read, while this is not right if we're in a context that hides thread events
2025-11-18 12:26:30 +01:00
Jorge Martín
4eb3cc9812 refactor(ffi): Remove unused Session::homeserver_url value 2025-11-18 12:16:28 +01:00
Jorge Martín
95d8ba94e1 doc: Add warnings about overriding the server URL
This may be dangerous when done while restoring an existing session.
2025-11-18 12:16:28 +01:00
Andy Balaam
ca436016b4 base: Bump ruma to 91424b1fc
And update to reflect the new feature name unstable-msc4362, which
provides the new unstable prefix io.element.msc4362.encrypt_state_events
2025-11-18 11:10:55 +00:00
Andy Balaam
5b82550199 crypto: Wait for a stream in state encryption test
This was sometimes failing for me locally, so use a macro that expects a
value from a stream soon, rather than immediately.
2025-11-18 11:10:55 +00:00
Andy Balaam
5d396e4795 crypto: Refer to MSC4362 when we are talking about encrypted state 2025-11-17 09:40:47 +02:00
Damir Jelić
e9c8f101d6 chore: Remove the various redecrytion tasks 2025-11-14 12:54:00 +01:00
Damir Jelić
6e97607c2d refactor(timeline): Replace the various decryption tasks with one R2D2 task 2025-11-14 12:54:00 +01:00