Commit Graph

13975 Commits

Author SHA1 Message Date
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
Ivan Enderlin
37c516f7f9 refactor: Rename new_latest_event to latest_event.
This patch removes the “new_” prefix to the latest event API.
2025-12-05 09:40:47 +01:00
Ivan Enderlin
81a8aa063b chore(base): Remove the old latest event API. 2025-12-05 09:40:47 +01:00
Ivan Enderlin
91091c7819 chore(ui): Remove the old latest event API.
So satisfying.
2025-12-05 09:40:47 +01:00
Ivan Enderlin
e4141b216a chore(ffi): Remove the old latest event API. 2025-12-05 09:40:47 +01:00
Kévin Commaille
b0574c1c2c feat(sdk): Add support for the stable m.oauth UIAA type
By replacing the custom implementation with the one in Ruma.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-12-05 09:20:48 +01:00
Jorge Martín
bfd8cfa1c8 refactor: Add uniffi-rs entries to deny.toml 2025-12-04 15:17:26 +01:00
Jorge Martín
67815e7787 refactor: Remove unused cargo_metadata dependency 2025-12-04 15:17:26 +01:00
Jorge Martín
031d8457b6 refactor: Upgrade uniffi to the latest upstream 2025-12-04 15:17:26 +01:00
Ivan Enderlin
c84f5965c3 test(ui): Fix tests according to last change.
This path adds events or state events to force the test to execute as
expected since a change in `bump_stamp` alone doesn't trigger a room
list update anymore.
2025-12-04 13:39:01 +01:00
Ivan Enderlin
638028ba7c fix(ui): Reduce number of updates in the room list.
This patch fixes a “bug” in the Room List. It's updated by
`RoomInfoNotableUpdateReasons`. However, 1 reason is creating
unnecessary updates: `RECENCY_STAMP`. The Room List is already updated
by the Latest Event. One usage of the Latest Event is to sort the Room
List by recency. Thus, since the Room List is updated by `LATEST_EVENT`,
we can ignore `RECENCY_STAMP`.
2025-12-04 13:39:01 +01:00
Ivan Enderlin
ae9600e872 doc(sdk): Remove mention of #3941.
This patch removes the mention of #3941 now it's closed.
2025-12-04 12:06:24 +01:00
Damir Jelić
b5d5a41453 Merge pull request #5926 from matrix-org/poljar/release-0.16.0
Release prep for 0.16.0
2025-12-04 10:32:26 +01:00
Damir Jelić
742a0db07b chore: Remove mentions of the 0.15 release
The 0.15.0 release was a misfire so we're skipping this version number.
matrix-sdk-ffi-0.16.0 matrix-sdk-test-utils-0.16.0 matrix-sdk-ui-0.16.0 matrix-sdk-0.16.0 matrix-sdk-sqlite-0.16.0 matrix-sdk-search-0.16.0 matrix-sdk-indexeddb-0.16.0 matrix-sdk-base-0.16.0 matrix-sdk-store-encryption-0.16.0 matrix-sdk-crypto-0.16.0 matrix-sdk-test-0.16.0 matrix-sdk-test-macros-0.16.0 matrix-sdk-qrcode-0.16.0 matrix-sdk-common-0.16.0
2025-12-04 09:59:04 +01:00
Damir Jelić
4701faf039 chore: Release matrix-sdk version 0.16.0 2025-12-04 09:59:04 +01:00
Doug
93f71ba977 ffi: Add support for checking login with QR code availability. 2025-12-03 18:35:29 +02:00
Damir Jelić
4ea0418abe fix: Don't attempt to serialize custom join rules (#5924)
This is not supported by Ruma. The join_rule field, despite being
defined as a pure string, can have associated data to it based on the
join rule variant.

This means that custom and unknown enum variants might lose data when
reserializing.

Let's just skip the serialization of custom join rules in the RoomInfo,
the concrete value is still available in the state store, it's just not
kept at hand in the RoomInfo.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
Co-authored-by: Ivan Enderlin <ivan@mnt.io>
2025-12-03 16:54:58 +01:00
Jorge Martín
2412403a1e doc: Add changelogs 2025-12-03 15:41:42 +01:00
Jorge Martín
ed72d3439a fix: avoid unwrap in Client::optimize_stores 2025-12-03 15:41:42 +01:00
Jorge Martín
9eee20b4f0 feat(ffi): add bindings for Client::get_store_sizes 2025-12-03 15:41:42 +01:00
Jorge Martín
bc45457d0e feat: add Client::get_store_sizes
This method will retrieve the database sizes if available and expose it in the client.

Note: the actual database size measuring is only implemented for the SQLite based stores
2025-12-03 15:41:42 +01:00
Jorge Martín
76651aec69 refactor: don't use full namespace for std::Result 2025-12-03 15:41:42 +01:00
Jorge Martín
e1cda064ee refactor: hopefully fix another lint error 2025-12-03 15:41:42 +01:00
Jorge Martín
94e5dbea0c refactor: hide optimize_store methods, add warnings to not use them in production
Also fix lint issue
2025-12-03 15:41:42 +01:00
Jorge Martín
c6e7a17f65 feat(ffi) Add Client::optimize_stores method 2025-12-03 15:41:42 +01:00
Jorge Martín
1e7bc1286e refactor: Add trace log to ensure the VACUUM operation has finished successfully
This was a bit confusing, because I treated a lack of logs as success when in reality my code was calling an empty implementation
2025-12-03 15:41:42 +01:00
Jorge Martín
b04cc9fe27 feat: Implement the new Store::optimize method added in the store traits
Only SQLite based stores will implement it for now, calling the `SqliteAsyncConnExt::vacuum` method
2025-12-03 15:41:42 +01:00
Jorge Martín
054dc31ce4 feat(sdk): Add Client::optimize_stores
This method should trigger any optimization/maintenance behaviours available to the stores, like `VACUUM` in SQLite
2025-12-03 15:41:42 +01:00
Ivan Enderlin
aaff9c5d72 test: Update tests according to last patches. 2025-12-03 13:11:40 +01:00
Ivan Enderlin
b1773d33c2 fix(sqlite): Make it possible to store the new SendRequestKey format. 2025-12-03 13:11:40 +01:00
Ivan Enderlin
090351c6ac doc(sqlite): Fix mention of a method.
This patch fixes a mention to a `save_send_queue_event` method. It
doesn't exist: it's `save_send_queue_request`.
2025-12-03 13:11:40 +01:00
Ivan Enderlin
045eb3486b test: Use SerializableEventContent::new instead of from_raw.
This patch replaces calls to `SerializableEventContent::from_raw` by
`new`: it's simpler and safer as it's not possible to use an invalid
event type.
2025-12-03 13:11:40 +01:00
Ivan Enderlin
40738ae119 feat(sdk): The Send Queue stores the sent event in the Event Cache.
The event has been sent to the server and the server has received it.
Yepee! Now, we usually wait on the server to give us back the event via
the sync.

Problem: sometimes the network lags, can be down, or the server may be
slow; well, anything can happen. It results in a weird situation where
the user sees its event being sent, then disappears before it's received
again from the server.

To avoid this situation, this patch eagerly saves the event in the Event
Cache. It's similar to what would happen if the event was echoed back
from the server via the sync, but we avoid any network issues. The Event
Cache is smart enought to deduplicate events based on the event ID, so
it's safe to do that.
2025-12-03 13:11:40 +01:00
Doug
acc66266c7 fix: Don't show a syncing indicator until the sync service is started. 2025-12-03 12:04:31 +01:00
Ivan Enderlin
e6094e6b07 chore: Use our own fork of indexed-db-futures.
This patch uses our own fork of `indexed-db-futures`: `matrix-indexed-db-futures`.
2025-12-03 11:59:50 +01:00