Commit Graph

14009 Commits

Author SHA1 Message Date
Damir Jelić
fa1ebbfdb8 feat(r2d2): Send out a report when backups get enabled 2025-12-15 14:43:43 +01:00
Damir Jelić
9bdd2ae977 test: Ensure that the test_enabling_backups_retries_decryption test times out 2025-12-15 14:43:43 +01:00
Damir Jelić
3a63838cdb test: Disable the lease lock tests for the memory store on wasm
This test for one reason or the other sporadically panics with an:
    > RuntimeError: unreachable

Let's disable this test on Wasm for now since the memory store isn't
that relevant anyways, especially not on Wasm.
2025-12-15 13:56:11 +01:00
Damir Jelić
7a1a2202f8 feat(r2d2): Add logs for when the room key stream lags 2025-12-15 11:38:12 +01:00
Damir Jelić
ce65317ab8 chore: Fix an incorrect warning due to the zeroize macro 2025-12-11 19:27:45 +01:00
Damir Jelić
cd988e53f8 doc(encryption): Add a link to MSC4287 2025-12-11 19:27:45 +01:00
Jonas Platte
ad58607013 Fix new clippy lints 2025-12-11 16:18:42 +01:00
Jonas Platte
eae3006f8d Reformat matrix-sdk-sqlite 2025-12-11 16:18:42 +01:00
Jonas Platte
024fd99e71 Upgrade matrix-sdk-sqlite to Rust edition 2024 2025-12-11 16:18:42 +01:00
Damir Jelić
4d3125e58e fix(common): Fix the debug implementation of TimelineEventKind 2025-12-11 16:09:52 +01:00
Damir Jelić
17a4888481 chore: Convert some Note's to NOTE's
The later is more standard and some editor plugins will highlight those
for you.
2025-12-11 16:09:21 +01:00
Damir Jelić
cc4cf3d54f refactor(r2d2): Create common report_lag method to reduce duplicated code 2025-12-11 13:34:48 +01:00
Mauro
9a6acd5334 Add space_room_from_id function (#5944)
Useful to get a specific space room if available given its id.

---------

Co-authored-by: Doug <douglase@element.io>
2025-12-11 12:11:48 +00:00
Damir Jelić
2522a3694f refactor(qr-login): Prepare the secure channel to be usable with HPKE
This patch abstracts away the cryptographic channel which is used in the
SecureChannel implementation for the QR code login support.

This will allow us to use HPKE alongside of ECIES since MSC4108 recently
proposed the switch to HPKE.
2025-12-11 09:24:55 +01:00
Jonas Platte
f2ba338e12 Fix new rustc + clippy warnings 2025-12-10 16:37:43 +00:00
Jonas Platte
0035259e3d Reformat matrix-sdk-crypto 2025-12-10 16:37:43 +00:00
Jonas Platte
431eb88a2d Upgrade matrix-sdk-crypto to Rust edition 2024 2025-12-10 16:37:43 +00:00
Jonas Platte
f8d5014921 Add + use<_> to impl Trait return types
(part of `cargo fix --edition`)
2025-12-10 16:37:43 +00:00
Jonas Platte
b0072160af Remove unnecessary ref mut from patterns
(part of `cargo fix --edition`)
2025-12-10 16:37:43 +00:00
Jonas Platte
536f889649 Add a missing semicolon 2025-12-10 16:37:43 +00:00
Jonas Platte
2c4a718c1a Rename local variable for edition 2024 compatibility
`gen` is a keyword starting in edition 2024.
2025-12-10 16:37:43 +00:00
Ivan Enderlin
b19377a96c fix(sdk): Better handling of redacted and redaction events in Latest Event (#5932)
This patch revisits the way redacted and redaction events are handled in
the Latest Event.

Previously, all redacted events were considered suitable candidate. It's
no longer the case.

Redaction and redacted events are no longer considered suitable.

This patch also revisits `rfind_map_event_in_memory_by` to return a
`&TimelineEvent` instead of an `OwnedEventId`, which could be more
performant in the future.

The tests have been updated accordingly.

---

* Fix https://github.com/matrix-org/matrix-rust-sdk/issues/5899
* Address https://github.com/matrix-org/matrix-rust-sdk/issues/4112

Signed-off-by: Stefan Ceriu <stefanc@matrix.org>
Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
matrix-sdk-ffi/20251210
2025-12-10 12:37:01 +00:00
Ivan Enderlin
76cae09f37 test(sdk): Test RoomEventCacheGenericUpdates are broadcasted. 2025-12-10 12:46:02 +01:00
Ivan Enderlin
81eb466555 fix(sdk): Broadcast a RoomEventCacheGenericUpdate when redecrypting events.
This patch sends a missing `RoomEventCacheGenericUpdate` when
redecrypting events.
2025-12-10 12:46:02 +01:00
Ivan Enderlin
0a24622ca2 fix(sdk): Broadcast a RoomEventCacheGenericUpdate when paginating from the network.
This patch sends a missing `RoomEventCacheGenericUpdate` when paginating
events from the network.
2025-12-10 12:46:02 +01:00
Ivan Enderlin
db0f4dd31c chore: Add logs in matrix_sdk::latest_events. 2025-12-10 12:46:02 +01:00
Ivan Enderlin
fbc69837e1 perf(sdk): Increase various channel capacities. 2025-12-10 12:46:02 +01:00
Ivan Enderlin
b9b5ead89e perf(sdk): Use an unbounded channel for room registration. 2025-12-10 12:46:02 +01:00
Ivan Enderlin
1c0f447632 perf(sdk): Increase the capacity of the room registration channel.
This patch increases the capacity of the room registration channel. The
hope is that it can reduce the need to wait on available permits under
heavy load.
2025-12-10 12:46:02 +01:00
Ivan Enderlin
e21a95f631 refactor(sdk): Do not use Fuse in listen_to_event_cache_and_send_queue_updates task.
This patch removes the use of `Fuse` in the
`listen_to_event_cache_and_send_queue_updates` task. `mpsc::Receiver`
and `broadcast::Received` are cancellation safe.
2025-12-10 12:46:02 +01:00
Ivan Enderlin
5a05bcb6b7 refactor(sdk): Hold write lock as few as possible.
This patch reduces the lifetime of the write locks in
`RegisteredRooms::room_latest_event` when the `RoomLatestEvents`
doesn't exists. If the `room_registration_sender` channel is full,
it has to wait. When waiting, the write lock is still alive, probably
blocking other operations. The idea is to create the `RoomLatestEvents`,
to downgrade the write lock to a read lock, and then to send the
registration message onto the `room_registration_sender`.
2025-12-10 12:46:02 +01:00
Hugh Nimmo-Smith
183116a4b1 Changelog 2025-12-09 19:18:06 +01:00
Hugh Nimmo-Smith
e916d9d374 fix(sdk): support device IDs that aren't Curve25519 public keys in GrantLoginWithGeneratedQrCode and GrantLoginWithScannedQrCode 2025-12-09 19:18:06 +01:00
Stefan Ceriu
604ce4acfd chore(sdk, crypto): add changelogs 2025-12-09 18:49:03 +01:00
Damir Jelić
cd57da59ec fix: Correctly construct the decrypted event in the send queue 2025-12-09 18:49:03 +01:00
Damir Jelić
9ff90a9b4d Add an integration test that the send queue can insert encrypted events 2025-12-09 18:49:03 +01:00
Stefan Ceriu
98f34f010c change(room::futures): Use a proper struct instead of a tuple for SendMessageLikeEvent results 2025-12-09 18:49:03 +01:00
Stefan Ceriu
d513807c9f change(send_queue): Use the Room:send_raw resulting EncryptionInfo to create a DecryptedRoomEvent and corresponding TimelineEvent and correctly populate the Event Cache. 2025-12-09 18:49:03 +01:00
Stefan Ceriu
8bd401b003 change(matrix_sdk::Room): Return the used EncryptionInfo when sending MessageLike and RawMessageLike events 2025-12-09 18:49:03 +01:00
Stefan Ceriu
b7d22da9f0 change(crypto): provide encryption information back directly from the Olm machine's raw encryption methods 2025-12-09 18:49:03 +01:00
Hugh Nimmo-Smith
b98a832c67 feat(ffi): Add QrCodeData::to_bytes() to allow generation of a QR code (#5939)
Signed-off-by: Hugh Nimmo-Smith <hughns@element.io>
2025-12-09 17:00:44 +00:00
Michael Goldenberg
acf3a7a04b doc(indexeddb): update changelog
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-12-09 15:24:15 +01:00
Michael Goldenberg
790136b9db fix(indexeddb): skip encoding event id when constructing bounds
In the implementation of EventCacheStore, there are a number of
places where the upper and lower bounds of an EventId are
constructed. It is important to bypass hashing and encryption
when constructing these bounds, otherwise the values will be
modified and will no longer represent the bounds.

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-12-09 15:24:15 +01:00
Michael Goldenberg
265cfc7710 test(indexeddb): initialize store cipher in encrypted tests for event cache and media store
Note that the encrypted tests were actually being run unencrypted.
Introducing a store cipher causes them to run encrypted, and
furthermore, reveals some bugs which are only visible when running
an encrypted event cache store.

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-12-09 15:24:15 +01:00
Damir Jelić
29b693e625 chore: Update the changelog to include the CVE and GSA references 2025-12-08 12:45:42 +01:00
Johannes Marbach
8637bdce12 fixup! feat(room): make load_event_with_relations also load relations when falling back to the network
Try loading relations from the cache before falling back to the server

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-12-08 09:44:59 +00:00
Johannes Marbach
db4e1b2c00 fixup! feat(room): make load_event_with_relations also load relations when falling back to the network
Cache related events after loading them

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-12-08 09:44:59 +00:00
Johannes Marbach
c82e1b8ec3 fixup! feat(room): make load_event_with_relations also load relations when falling back to the network
Change limit to 256

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-12-08 09:44:59 +00:00
Johannes Marbach
9105db3d82 feat(room): make load_event_with_relations also load relations when falling back to the network
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-12-08 09:44:59 +00:00
Ivan Enderlin
238e4e8a87 doc: Mention #5624 in CHANGELOG.mds. 2025-12-05 09:40:47 +01:00