Commit Graph

421 Commits

Author SHA1 Message Date
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ć
742a0db07b chore: Remove mentions of the 0.15 release
The 0.15.0 release was a misfire so we're skipping this version number.
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
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
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
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
b4d7881a58 chore: Reduce the number of logs.
This patch removes some logs around the cross-process lock methods. This
is called pretty often by the cross-process lock task, which pollute the
log files.
2025-12-02 21:59:46 +01:00
Kévin Commaille
e47867f232 refactor(sdk): Split supported versions and well-known cache
The supported versions are necessary for querying almost all endpoints,
but after homeserver auto-discovery the well-known info is only
necessary to get the MatrixRTC foci advertised by the homeserver. So it
shouldn't be necessary to always request both at the same time.

Besides:

- Not all clients support MatrixRTC, so they don't need the well-known
  info.
- The well-known info is only supposed to be used for homeserver
  auto-discovery before login. In fact, the MatrixRTC MSC was changed to
  use a new endpoint for this.
- We don't have access to the server name after restoring the Client, so
  the well-known lookup is more likely to fail.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-12-01 15:22:48 +00:00
Damir Jelić
f4fef6e995 chore: Fix the dates of the 0.15.0 release 2025-11-27 10:07:41 +01:00
Damir Jelić
850b7dde6d chore: Release matrix-sdk version 0.15.0 2025-11-26 15:44:26 +01:00
Damir Jelić
127154fcfa chore: Bump our deps and update the Cargo.lock file 2025-11-21 14:18:22 +01:00
Ivan Enderlin
610f82aeb2 chore(sqlite): Remove connection::Config.
This patch removes the `connection::Config` type. It was “inspired”
from `deadpool_sqlite`, but we can clearly remove it by using our own
`SqliteStoreConfig` type. It simplifies the way we open a database.
2025-11-11 11:09:18 +01:00
Ivan Enderlin
60490f4eff doc(sqlite): Add documentation to connection.
This patch explains why we create our own implementation of `deadpool`
for `rusqlite`.
2025-11-11 11:09:18 +01:00
Ivan Enderlin
6a828e31dd feat(sqlite): Replace deadpool-sqlite by our own implementation.
This patch replaces `deadpool-sqlite` by our own implementation in
`crate::connection`. It still uses `deadpool` but the object manager has
a different implementation.
2025-11-11 11:09:18 +01:00
Ivan Enderlin
6c922e69d0 feat(common): Add a cross-process lock generation.
This patch adds `CrossProcessLockGeneration`. A lock generation is an
integer incremented each time the lock is taken by another holder. If
the generation changes, it means the lock is _dirtied_. This _dirtying_
aspect is going to be expanded in the next patches. This patch focuses
on the introduction of this _generation_.

The `CrossProcessLock::try_lock_once` method, and
the `TryLock::try_lock` method, both returns a
`Option<CrossProcessLockGeneration>` instead of a `bool`: `true` is
replaced by `Some(_)`, `false` by `None`.
2025-11-07 11:26:09 +01:00
Ivan Enderlin
81ff96d569 fix(sqlite): Fix the database version.
The database has been updated but the version hasn't been bumped.
2025-11-04 14:59:15 +01:00
Damir Jelić
49db60d951 feat: Allow events to be fetched by event type 2025-11-04 13:58:49 +01:00
Damir Jelić
950c42742d refactor(sqlite): Save the event type of an event in the SQLite event cache 2025-11-04 13:58:49 +01:00
Richard van der Hoff
0faf3eecea update changelogs 2025-10-31 12:00:06 +00:00
Richard van der Hoff
444fcfa098 stores: new method CryptoStore::get_withheld_sessions_by_room_id
Implement this across all the store implementations
2025-10-30 23:10:05 +00:00
Richard van der Hoff
cadbd33957 sqlite: add room_id index on direct_withheld_info table 2025-10-30 18:50:24 +00:00
Damir Jelić
896f4114a2 chore(sqlite): Don't log the room ID twice when saving events
The room ID is already logged as part of the span due to the instrument
attribute.
2025-10-29 15:58:41 +01:00
Richard van der Hoff
8bb8bbae9c Merge pull request #5737 from matrix-org/kaylendog/shared-history/store
When we receive a key bundle, add any `withheld` data to the crypto store.
2025-10-24 17:31:46 +02:00
Skye Elliot
02fe0c9f53 feat: Add RoomKeyWithheldEntry to wrap to-device and bundle payloads. 2025-10-24 12:33:36 +01:00
Ivan Enderlin
a7cb094aaf feat(sqlite): Add a write-only connection in SqliteStateStore.
This patch introduces a write-only connection in `SqliteStateStore`
_à la_ `SqliteEventCacheStore`. The idea is to get many read-only
connections, and a single write-only connections behind a lock, so that
there is a single writer at a time.

This patch renames the `acquire` method to `read`, and it introduces a
new `write` connection.
2025-10-03 15:00:37 +02:00
Ivan Enderlin
764a8a4c77 doc(sqlite): Fix // to ///.
This patch transforms an inline comment into a doc comment.
2025-10-03 15:00:37 +02:00
Benjamin Bouvier
37ee5d5075 refactor(stores): get rid of the temporary compute_filter_strings now that Ruma has been updated
This was a local fix for a bug in Ruma, that has been fixed upstream since then, so we can get rid of the workaround now.
2025-10-01 16:50:23 +00:00
Ivan Enderlin
2ec33183c4 doc(sqlite): Fix formatting and typo. 2025-09-26 16:07:20 +02:00
multi prise
fa7fd5df42 Remove unusual import 2025-09-24 12:35:17 +02:00
multi prise
adc8276162 Add key opening logic to the media store 2025-09-24 12:35:17 +02:00
multi prise
abecb33e34 Lint code 2025-09-24 12:35:17 +02:00
multi prise
b26ce417f0 Add comments documenting the new structure 2025-09-24 12:35:17 +02:00
multi prise
5a1bd54bb1 Implement use of Zeroizing struct for string 2025-09-24 12:35:17 +02:00
multi prise
0d0e2aa472 Add ZeroiseOnDrop trait to secret and make the key a Box 2025-09-24 12:35:17 +02:00
multi prise
88ed0afcb3 Replace missing line 2025-09-24 12:35:17 +02:00
multi prise
9938ab8b1f Reimplement previous tests for the store and on top of the one testing the opening with a key 2025-09-24 12:35:17 +02:00
multi prise
eed7384934 Remove some superfluous change 2025-09-24 12:35:17 +02:00
multi prise
32255cd178 Update changelog 2025-09-24 12:35:17 +02:00
multi prise
c51536a054 reformat 2025-09-24 12:35:17 +02:00
multi prise
6099928b40 Remove conditional logic for running tests 2025-09-24 12:35:17 +02:00
multi prise
fac1f295b2 Correct wrong borrow 2025-09-24 12:35:17 +02:00
multi prise
24d02a72e3 implement zeroizing of secrets after use 2025-09-24 12:35:17 +02:00
multi prise
2a073043fd Revert "Use of lifetime in order to not clone/copy the data"
This reverts commit 009ee3a0e5fdff1332aaf0b1e62ab2577d728b82.
2025-09-24 12:35:17 +02:00
multi prise
8e759befd3 Refactorize tests config to correspond with the new api 2025-09-24 12:35:17 +02:00
multi prise
9faffa5b10 Temporary comment insecure function 2025-09-24 12:35:17 +02:00