Update Matrix Rust SDK to 26.10.14-nightly (#7930)

* Update Matrix Rust SDK to 26.10.14-nightly

* `withSearchIndexStore` now uses `key` instead of passphrase

* Fix `RustMatrixClient` now returning `searchIndex` size too

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
ElementBot
2026-10-15 15:47:56 +01:00
committed by GitHub
parent 287001f9aa
commit 4ebcf960ce
9 changed files with 45 additions and 9 deletions
@@ -737,6 +737,7 @@ class RustMatrixClient(
eventCacheStore = eventCacheStore?.bytes,
mediaStore = mediaStore?.bytes,
cryptoStore = cryptoStore?.bytes,
searchIndex = searchIndex?.bytes,
)
}
}
@@ -188,7 +188,7 @@ class RustMatrixClientFactory(
// use, or left unencrypted for sessions without one, matching those stores.
withSearchIndexStore(
path = File(sessionPaths.fileDirectory, SEARCH_INDEX_DIRECTORY).absolutePath,
password = clientSecret?.formattedAsString(),
key = clientSecret?.formattedAsString(),
)
} else {
this
@@ -44,6 +44,9 @@ class DefaultGetDatabaseSizesUseCase(
cryptoStore = cryptoSize.bytes,
eventCacheStore = eventCacheSize.bytes,
mediaStore = mediaCacheSize.bytes,
// TODO - The search index is not stored in a database file but in a directory, which can be expensive to calculate.
// For now, we return null to avoid performance issues.
searchIndex = null,
))
}
@@ -256,7 +256,15 @@ class RustMatrixClientTest {
@Test
fun `getDatabaseSizes returns the database sizes`() = runTest {
val client = createRustMatrixClient(
client = FakeFfiClient(getStoreSizesResult = { StoreSizes(null, 10uL, 11uL, 12uL) })
client = FakeFfiClient(getStoreSizesResult = {
StoreSizes(
cryptoStore = null,
stateStore = 10uL,
eventCacheStore = 11uL,
mediaStore = 12uL,
searchIndex = 13uL,
)
})
)
client.getDatabaseSizes().getOrThrow().run {
@@ -264,6 +272,7 @@ class RustMatrixClientTest {
assertThat(stateStore).isEqualTo(10.bytes)
assertThat(eventCacheStore).isEqualTo(11.bytes)
assertThat(mediaStore).isEqualTo(12.bytes)
assertThat(searchIndex).isEqualTo(13.bytes)
}
}