Commit Graph

12969 Commits

Author SHA1 Message Date
Benjamin Bouvier
247ec1dcd2 refactor(event cache): shorten the name of room_event_cache_generic_update
We're in the inner workings of the event cache, so the prefix is
redundant, in the ambient context.
2025-08-14 13:05:57 +02:00
Benjamin Bouvier
558d7b56f9 refactor(event cache): get rid of RoomEventCacheGenericUpdate::Clear
The semantics of this variant are unclear: sometimes a timeline could be
cleared, which would result in a `UpdateTimeline` (and if we looked at
the vector diffs, it would include a `Clear`), but in this case the
`Clear` variant would not be emitted.

It was only emitted in a few adhoc spots, but it was missing the whole
picture. Also, the current observer was only interested in getting *a*
room update with the room id, and didn't react particularly to clears.
So, there's apparently little reason in having this variant, and as a
result we should get rid of it.
2025-08-14 13:05:57 +02:00
dragonfly1033
1201be484a fix!(sdk): Client::sync_once defaults to reuse previous token
Introduces a new `SyncToken` enum for the `SyncSettings::token` field.
The enum has 3 variants: ReusePrevious (default), NoToken, Specific(String).

Some tests were changed to use the old default (NoToken).
2025-08-14 12:14:06 +02:00
Benjamin Bouvier
1ffc014621 chore(tests): make some tests less flaky
When I run these locally, they may now take more than 100ms to run, when
being run in parallel. Increase the timeout duration to 1s.
2025-08-14 09:18:15 +02:00
Benjamin Bouvier
9491757cad chore: check in the correct version of Ruma for ruma-signatures 2025-08-14 09:18:15 +02:00
Kévin Commaille
33df0422e8 Upgrade Ruma: profile response
Handle the changes to the Response of the get_profile endpoint. The
content of the response is private and fields must be accessed with
methods.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-14 08:57:52 +02:00
Kévin Commaille
a3a239f999 Upgrade Ruma: revert StrippedState
Handle the previous breaking change that was reverted: `StrippedState`
was removed and `AnyStrippedStateEvent` is used again.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-14 08:57:52 +02:00
Skye Elliot
ca8b64e041 feat: Change type of DecryptedRoomEvent::event to Raw<AnyTimelineEvent> (#5512)
- [x] Change `DecryptedRoomEvent::event` to `Raw<AnyTimelineEvent>`
- [x] Update usages to pattern match on `AnyTimelineEvent::MessageLike`
where necessary

---------

Signed-off-by: kaylendog <actuallyori@gmail.com>
2025-08-14 08:53:56 +02:00
Stefan Ceriu
140e751af0 feat(timeline): consider unthreaded read receipts for ReceiptThread::Main timelines when computing timeline items states.
This patch updates the Timeline Controller's `handle_explicit_read_receipts` method to also consider unthreaded read receipts on **threaded** **main** timelines when calculating timeline items states and adds a test for it.

This picks up from #5442 and fixes https://github.com/matrix-org/matrix-rust-sdk/issues/5440
2025-08-14 05:24:20 +00:00
multisme
a66b2c5123 feat(test): add a test utils crate to make log initialization possible everywhere
This PR allows `init_tracing_for_test` to be called by any other crate in the sdk

Signed-off-by: multi [multiestunhappydev@gmail.com](mailto:multiestunhappydev@gmail.com)
2025-08-14 05:24:03 +00:00
Copilot
69bef9a76a feat(sdk,ffi): Add server_vendor_info method to matrix-sdk with automatic logging in FFI
Add a new `server_vendor_info` method on the `matrix-sdk` `Client` that calls the `/_matrix/federation/v1/version` endpoint to retrieve the server's software name and version information.

Also add it to the bindings + log it when initializing the logs.
2025-08-14 05:14:25 +00:00
Michael Goldenberg
b3c53dd08f test(indexeddb): run time-based integration tests on event cache
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-08-13 16:00:48 +02:00
Michael Goldenberg
c8bffa26a4 test(event-cache-store): make time-based integration tests compatible with wasm targets
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-08-13 16:00:48 +02:00
Michael Goldenberg
b4ef6cef55 refactor(indexeddb): add IndexedDB-backed impl of EventCacheStore::try_take_leased_lock
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-08-13 16:00:48 +02:00
Michael Goldenberg
c6854a5c22 refactor(indexeddb): add support for indexing time-based locks in event cache
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-08-13 16:00:48 +02:00
Michael Goldenberg
fb563953c9 refactor(indexeddb): add object store for tracking time-based lock on event cache
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-08-13 16:00:48 +02:00
Michael Goldenberg
bc0018aecb refactor(indexeddb): add type to represent time-based lock on event cache
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-08-13 16:00:48 +02:00
Johannes Marbach
12292c5375 feat(ffi): allow specifying thumbnails using UploadSource
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-08-13 15:50:06 +02:00
Johannes Marbach
cf9d058265 feat(ffi): allow specifying gallery items using UploadSource
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-08-13 15:30:34 +02:00
Benjamin Bouvier
4da13e1096 refactor!(ffi): use the send queue by default to upload medias
We do consider it stable now, after months of running it in production,
so let's use it by default to simplify the `UploadParameters`.
2025-08-13 15:16:16 +02:00
Benjamin Bouvier
333d4563ce refactor!(ffi): remove legacy progress upload tracking
This can now be achieved by using the send queue's global progress
support, i.e. `Client::enable_send_queue_upload_progress()`.
2025-08-13 15:16:16 +02:00
Andy Balaam
01059ef26c refactor(timeline): Make RoomDataProvider provide Decryptor to simplify redecryption 2025-08-13 12:40:07 +01:00
Kévin Commaille
7724271508 doc(test): Fix method auto-link
Rustdoc doesn't support passing parameters for auto-links.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-13 12:31:22 +01:00
Kévin Commaille
8dfe732cce doc(sdk): Fix method auto-link
Rustdoc doesn't do multi-level auto-link, so we have to provide the link
manually.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-13 12:31:22 +01:00
Kévin Commaille
1cf3477ada feat(crypto): Implement Default for SecretStorageKey
For the new_without_default clippy lint.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-13 12:31:22 +01:00
Kévin Commaille
0a2205f540 refactor(ffi): Remove dead code
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-13 12:31:22 +01:00
Kévin Commaille
c586812159 refactor(crypto): Remove dead code
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-13 12:31:22 +01:00
Kévin Commaille
c6210cad21 ci: Upgrade the version of Rust nightly
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-13 12:31:22 +01:00
Ivan Enderlin
a9ce1c6e58 doc(sdk): Fix CHANGELOG.md entry.
The link for an entry was wrong. It's #5439, not #5442.
2025-08-13 10:08:50 +02:00
Kévin Commaille
1eb8f6ac16 Fix shared history test
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-12 17:25:22 +03:00
Kévin Commaille
e0feebdb2b fix(sdk): Support unauthenticated media endpoint in Client::load_or_fetch_max_upload_size
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-12 17:25:22 +03:00
Kévin Commaille
0fee716c1e fix(sdk): Override timeout of media downloads for unauthenticated media endpoints too
There is no reason to treat them differently.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-12 17:25:22 +03:00
Kévin Commaille
c41ed8a78a refactor(sdk): Use Ruma support for (un)stable feature flags for authenticated media
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-12 17:25:22 +03:00
Benjamin Bouvier
53f02c9f2d chore: bump Ruma
So as to get some changes for Element Call:
https://github.com/ruma/ruma/pull/2176
2025-08-12 16:06:26 +02:00
Johannes Marbach
e2f0b4f3fd feat(ffi): expose media upload progress through EventSendState::NotSentYet
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-08-12 12:57:18 +02:00
Johannes Marbach
0a796cb468 feat(timeline): communicate media upload progress through EventSendState::NotSentYet
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-08-12 12:57:18 +02:00
copilot-swe-agent[bot]
e3390c17ec docs: Add changelog entries for LowPriority and NonLowPriority filters
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
2025-08-12 13:17:53 +03:00
Doug
c6dc070c31 chore: Refactor non_space.rs filter to space.rs, using new_filter_not in the FFI. 2025-08-12 13:17:53 +03:00
copilot-swe-agent[bot]
486befc7fb feat: Add NonLowPriority to the FFI bindings
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
2025-08-12 13:17:53 +03:00
copilot-swe-agent[bot]
9848d1472e feat: Add LowPriority filter implementation and FFI bindings
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
2025-08-12 13:17:53 +03:00
Damir Jelić
6c944a9b39 Add a changelog entry for the sender data check when accepting historic room keys 2025-08-08 15:56:13 +02:00
Damir Jelić
b4b010f9fe fix(crypto): Do a keys query before we accept historic room key bundles 2025-08-08 15:56:13 +02:00
Damir Jelić
536ba518bb feat(crypto): Check sender data before accepting room key bundles 2025-08-08 15:56:13 +02:00
Damir Jelić
917c46b570 chore: Remove a stale TODO comment 2025-08-08 15:56:13 +02:00
Damir Jelić
b29886c0df test(crypto): Add a test that we refuse bundles if the sender isn't trusted enough 2025-08-08 15:56:13 +02:00
Damir Jelić
360c2d7f32 refactor(crypto): Turn should_recalculate function into an associated function for SenderData
This allows us to use the function in more places where SenderData is
used.
2025-08-08 15:56:13 +02:00
dragonfly1033
683f0f4027 feat(multiverse): Add room creation to multiverse 2025-08-08 12:33:48 +01:00
Damir Jelić
c783ed8a6f Log a special error when try to upload duplicate one-time keys 2025-08-08 10:35:52 +02:00
Damir Jelić
139673810f Remember the public Curve25519 key of the sender of the historic room key bundle 2025-08-08 09:19:19 +02:00
Kévin Commaille
669ebf2408 refactor(base): Don't take room ID in Notification::push_notification_from_event_if
It is already in the `PushConditionRoomCtx`, so we don't need an extra
argument for it.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-07 16:02:56 +02:00