@@ -421,19 +421,6 @@ impl MimeMessage {
421
421
timestamp_sent =
422
422
Self :: get_timestamp_sent ( & mail. headers , timestamp_sent, timestamp_rcvd) ;
423
423
if !signatures. is_empty ( ) {
424
- // Handle any gossip headers if the mail was encrypted. See section
425
- // "3.6 Key Gossip" of <https://autocrypt.org/autocrypt-spec-1.1.0.pdf>
426
- // but only if the mail was correctly signed. Probably it's ok to not require
427
- // encryption here, but let's follow the standard.
428
- let gossip_headers = mail. headers . get_all_values ( "Autocrypt-Gossip" ) ;
429
- gossiped_keys = update_gossip_peerstates (
430
- context,
431
- timestamp_sent,
432
- & from. addr ,
433
- & recipients,
434
- gossip_headers,
435
- )
436
- . await ?;
437
424
// Remove unsigned opportunistically protected headers from messages considered
438
425
// Autocrypt-encrypted / displayed with padlock.
439
426
// For "Subject" see <https://github.com/deltachat/deltachat-core-rust/issues/1790>.
@@ -474,6 +461,22 @@ impl MimeMessage {
474
461
& mail. headers ,
475
462
) ;
476
463
464
+ if !signatures. is_empty ( ) {
465
+ // Handle any gossip headers if the mail was encrypted. See section
466
+ // "3.6 Key Gossip" of <https://autocrypt.org/autocrypt-spec-1.1.0.pdf>
467
+ // but only if the mail was correctly signed. Probably it's ok to not require
468
+ // encryption here, but let's follow the standard.
469
+ let gossip_headers = mail. headers . get_all_values ( "Autocrypt-Gossip" ) ;
470
+ gossiped_keys = update_gossip_peerstates (
471
+ context,
472
+ timestamp_sent,
473
+ & from. addr ,
474
+ & recipients,
475
+ gossip_headers,
476
+ )
477
+ . await ?;
478
+ }
479
+
477
480
if let Some ( inner_from) = inner_from {
478
481
if !addr_cmp ( & inner_from. addr , & from. addr ) {
479
482
// There is a From: header in the encrypted
0 commit comments