Skip to content

Commit

Permalink
Mark self key as verified in mark_peer_as_verified()
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Dec 6, 2023
1 parent 004b62e commit 0be7d58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/securejoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,8 @@ async fn mark_peer_as_verified(
};
peerstate.set_verified(PeerstateKeyType::PublicKey, fingerprint, verifier)?;
peerstate.prefer_encrypt = EncryptPreference::Mutual;
peerstate.self_verified_key_id =
Some(context.get_config_i64(Config::KeyId).await?).filter(|&id| id > 0);
peerstate.save_to_db(&context.sql).await.unwrap_or_default();
Ok(true)
}
Expand Down

0 comments on commit 0be7d58

Please sign in to comment.