Do not warn about gossip key changes if it is not used

This commit is contained in:
Alexander Krotov
2020-08-13 23:00:46 +03:00
committed by holger krekel
parent 9810e5562a
commit 8f7f4f95e8

View File

@@ -241,7 +241,10 @@ impl<'a> Peerstate<'a> {
|| old_gossip_fingerprint != self.gossip_key_fingerprint
{
self.to_save = Some(ToSave::All);
if old_gossip_fingerprint.is_some() {
// Warn about gossip key change only if there is no public key obtained from
// Autocrypt header, which overrides gossip key.
if old_gossip_fingerprint.is_some() && self.public_key_fingerprint.is_none() {
self.fingerprint_changed = true;
}
}