@@ -76,12 +76,12 @@ pub(crate) struct MimeMessage {
7676 pub chat_disposition_notification_to : Option < SingleInfo > ,
7777 pub decrypting_failed : bool ,
7878
79- /// Set of valid signature fingerprints if a message is an
79+ /// Valid signature fingerprint if a message is an
8080 /// Autocrypt encrypted and signed message.
8181 ///
8282 /// If a message is not encrypted or the signature is not valid,
83- /// this set is empty .
84- pub signatures : HashSet < Fingerprint > ,
83+ /// this is `None` .
84+ pub signature : Option < Fingerprint > ,
8585
8686 /// The addresses for which there was a gossip header
8787 /// and their respective gossiped keys.
@@ -571,7 +571,7 @@ impl MimeMessage {
571571 decrypting_failed : mail. is_err ( ) ,
572572
573573 // only non-empty if it was a valid autocrypt message
574- signatures,
574+ signature : signatures. into_iter ( ) . next ( ) ,
575575 autocrypt_fingerprint,
576576 gossiped_keys,
577577 is_forwarded : false ,
@@ -936,7 +936,7 @@ impl MimeMessage {
936936 /// This means the message was both encrypted and signed with a
937937 /// valid signature.
938938 pub fn was_encrypted ( & self ) -> bool {
939- ! self . signatures . is_empty ( )
939+ self . signature . is_some ( )
940940 }
941941
942942 /// Returns whether the email contains a `chat-version` header.
0 commit comments