@@ -87,12 +87,12 @@ pub(crate) struct MimeMessage {
8787 pub chat_disposition_notification_to : Option < SingleInfo > ,
8888 pub decrypting_failed : bool ,
8989
90- /// Set of valid signature fingerprints if a message is an
90+ /// Valid signature fingerprint if a message is an
9191 /// Autocrypt encrypted and signed message.
9292 ///
9393 /// If a message is not encrypted or the signature is not valid,
94- /// this set is empty .
95- pub signatures : HashSet < Fingerprint > ,
94+ /// this is `None` .
95+ pub signature : Option < Fingerprint > ,
9696
9797 /// The addresses for which there was a gossip header
9898 /// and their respective gossiped keys.
@@ -589,7 +589,7 @@ impl MimeMessage {
589589 decrypting_failed : mail. is_err ( ) ,
590590
591591 // only non-empty if it was a valid autocrypt message
592- signatures,
592+ signature : signatures. into_iter ( ) . last ( ) ,
593593 autocrypt_fingerprint,
594594 gossiped_keys,
595595 is_forwarded : false ,
@@ -966,7 +966,7 @@ impl MimeMessage {
966966 /// This means the message was both encrypted and signed with a
967967 /// valid signature.
968968 pub fn was_encrypted ( & self ) -> bool {
969- ! self . signatures . is_empty ( )
969+ self . signature . is_some ( )
970970 }
971971
972972 /// Returns whether the email contains a `chat-version` header.
0 commit comments