Restore peerstate constants from C core

This commit is contained in:
Alexander Krotov
2019-11-26 17:48:57 +01:00
committed by holger krekel
parent fc1a136448
commit 59700cb477
6 changed files with 48 additions and 17 deletions

View File

@@ -672,7 +672,11 @@ fn mark_peer_as_verified(context: &Context, fingerprint: impl AsRef<str>) -> Res
if let Some(ref mut peerstate) =
Peerstate::from_fingerprint(context, &context.sql, fingerprint.as_ref())
{
if peerstate.set_verified(1, fingerprint.as_ref(), 2) {
if peerstate.set_verified(
DC_PS_PUBLIC_KEY,
fingerprint.as_ref(),
PeerstateVerifiedStatus::BidirectVerified,
) {
peerstate.prefer_encrypt = EncryptPreference::Mutual;
peerstate.to_save = Some(ToSave::All);
peerstate