mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-09 16:34:32 -04:00
crypto: Remove one-time keys after a inbound session was created successfully.
This commit is contained in:
@@ -199,6 +199,14 @@ impl Account {
|
||||
.await
|
||||
.create_inbound_session_from(their_identity_key, message)?;
|
||||
|
||||
self.inner
|
||||
.lock()
|
||||
.await
|
||||
.remove_one_time_keys(&session)
|
||||
.expect(
|
||||
"Session was successfully created but the account doesn't hold a matching one-time key",
|
||||
);
|
||||
|
||||
let now = Instant::now();
|
||||
|
||||
Ok(Session {
|
||||
|
||||
Reference in New Issue
Block a user