diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/OlmMachine.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/OlmMachine.kt index 16211912e1..c2001931d6 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/OlmMachine.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/OlmMachine.kt @@ -500,7 +500,8 @@ internal class OlmMachine( val result = inner.importKeys(decodedKeys, passphrase, rustListener) - ImportRoomKeysResult(result.total, result.imported) + // TODO do we want to remove the cast here? + ImportRoomKeysResult(result.total.toInt(), result.imported.toInt()) } @Throws(CryptoStoreException::class) @@ -516,7 +517,7 @@ internal class OlmMachine( val result = inner.importDecryptedKeys(encodedKeys, rustListener) - ImportRoomKeysResult(result.total, result.imported) + ImportRoomKeysResult(result.total.toInt(), result.imported.toInt()) } @Throws(CryptoStoreException::class) diff --git a/rust-sdk/src/machine.rs b/rust-sdk/src/machine.rs index f8cc596ef7..f3859cffdd 100644 --- a/rust-sdk/src/machine.rs +++ b/rust-sdk/src/machine.rs @@ -618,8 +618,8 @@ impl OlmMachine { .block_on(self.inner.import_keys(keys, listener))?; Ok(KeysImportResult { - total: result.1 as i32, - imported: result.0 as i32, + total: result.total_count as i64, + imported: result.imported_count as i64, }) } diff --git a/rust-sdk/src/olm.udl b/rust-sdk/src/olm.udl index 41d77a3aca..977b171e9c 100644 --- a/rust-sdk/src/olm.udl +++ b/rust-sdk/src/olm.udl @@ -58,8 +58,8 @@ dictionary DeviceLists { }; dictionary KeysImportResult { - i32 total; - i32 imported; + i64 total; + i64 imported; }; dictionary DecryptedEvent { diff --git a/rust-sdk/src/responses.rs b/rust-sdk/src/responses.rs index 5b0d21599e..a7e9308d32 100644 --- a/rust-sdk/src/responses.rs +++ b/rust-sdk/src/responses.rs @@ -295,8 +295,8 @@ impl From for RumaDeviceLists { } pub struct KeysImportResult { - pub total: i32, - pub imported: i32, + pub total: i64, + pub imported: i64, } pub(crate) enum OwnedResponse {