From 8ed1e37cef1b5ac33c81920c0569f8b70a9fb3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 23 Oct 2020 11:17:37 +0200 Subject: [PATCH] crypto: Save the account if we create a new one. --- matrix_sdk_crypto/src/machine.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index ba381ee8..cb80a008 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -222,7 +222,9 @@ impl OlmMachine { } None => { debug!("Creating a new account"); - ReadOnlyAccount::new(&user_id, &device_id) + let account = ReadOnlyAccount::new(&user_id, &device_id); + store.save_account(account.clone()).await?; + account } };