crypto: Save the account after an inbound session was created.

master
Damir Jelić 2020-04-10 16:18:55 +02:00
parent 7577ddfc00
commit 01656690bc
1 changed files with 5 additions and 2 deletions

View File

@ -696,9 +696,12 @@ impl OlmMachine {
let mut session = match &message {
OlmMessage::Message(_) => return Err(OlmError::SessionWedged),
OlmMessage::PreKey(m) => {
self.account
let session = self
.account
.create_inbound_session(sender_key, m.clone())
.await?
.await?;
self.store.save_account(self.account.clone()).await?;
session
}
};