@@ -362,8 +362,8 @@ impl Peerstate {
362
362
}
363
363
364
364
/// Returns the contents of the `Autocrypt-Gossip` header for outgoing messages.
365
- pub fn render_gossip_header ( & self , min_verified : bool ) -> Option < String > {
366
- if let Some ( key) = self . peek_key ( min_verified ) {
365
+ pub fn render_gossip_header ( & self , verified : bool ) -> Option < String > {
366
+ if let Some ( key) = self . peek_key ( verified ) {
367
367
let header = Aheader :: new (
368
368
self . addr . clone ( ) ,
369
369
key. clone ( ) , // TODO: avoid cloning
@@ -386,8 +386,8 @@ impl Peerstate {
386
386
/// Converts the peerstate into the contact public key.
387
387
///
388
388
/// Similar to [`Self::peek_key`], but consumes the peerstate and returns owned key.
389
- pub fn take_key ( mut self , min_verified : bool ) -> Option < SignedPublicKey > {
390
- if min_verified {
389
+ pub fn take_key ( mut self , verified : bool ) -> Option < SignedPublicKey > {
390
+ if verified {
391
391
self . verified_key . take ( )
392
392
} else {
393
393
self . public_key . take ( ) . or_else ( || self . gossip_key . take ( ) )
@@ -396,15 +396,15 @@ impl Peerstate {
396
396
397
397
/// Returns a reference to the contact public key.
398
398
///
399
- /// `min_verified ` determines the minimum required verification status of the key.
399
+ /// `verified ` determines the required verification status of the key.
400
400
/// If verified key is requested, returns the verified key,
401
401
/// otherwise returns the Autocrypt key.
402
402
///
403
403
/// Returned key is suitable for sending in `Autocrypt-Gossip` header.
404
404
///
405
405
/// Returns `None` if there is no suitable public key.
406
- pub fn peek_key ( & self , min_verified : bool ) -> Option < & SignedPublicKey > {
407
- if min_verified {
406
+ pub fn peek_key ( & self , verified : bool ) -> Option < & SignedPublicKey > {
407
+ if verified {
408
408
self . verified_key . as_ref ( )
409
409
} else {
410
410
self . public_key . as_ref ( ) . or ( self . gossip_key . as_ref ( ) )
@@ -414,8 +414,8 @@ impl Peerstate {
414
414
/// Returns a reference to the contact's public key fingerprint.
415
415
///
416
416
/// Similar to [`Self::peek_key`], but returns the fingerprint instead of the key.
417
- fn peek_key_fingerprint ( & self , min_verified : bool ) -> Option < & Fingerprint > {
418
- if min_verified {
417
+ fn peek_key_fingerprint ( & self , verified : bool ) -> Option < & Fingerprint > {
418
+ if verified {
419
419
self . verified_key_fingerprint . as_ref ( )
420
420
} else {
421
421
self . public_key_fingerprint
0 commit comments