crypto: Save the account if the one-time key count updates.

master
Damir Jelić 2020-09-18 20:41:14 +02:00
parent 2e3d30d7b4
commit 95e906e0dc
1 changed files with 4 additions and 0 deletions

View File

@ -1097,6 +1097,10 @@ impl OlmMachine {
let count: u64 = one_time_key_count.map_or(0, |c| (*c).into()); let count: u64 = one_time_key_count.map_or(0, |c| (*c).into());
self.update_key_count(count); self.update_key_count(count);
if let Err(e) = self.store.save_account(self.account.clone()).await {
error!("Error updating the one-time key count {:?}", e);
}
for user_id in &response.device_lists.changed { for user_id in &response.device_lists.changed {
if let Err(e) = self.identity_manager.mark_user_as_changed(&user_id).await { if let Err(e) = self.identity_manager.mark_user_as_changed(&user_id).await {
error!("Error marking a tracked user as changed {:?}", e); error!("Error marking a tracked user as changed {:?}", e);