File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ impl MimeMessage {
264
264
// messages are shown as unencrypted anyway.
265
265
266
266
timestamp_sent =
267
- Self :: get_timestamp_sent ( & mail . headers , timestamp_sent, timestamp_rcvd) ;
267
+ Self :: get_timestamp_sent ( & part . headers , timestamp_sent, timestamp_rcvd) ;
268
268
MimeMessage :: merge_headers (
269
269
context,
270
270
& mut headers,
@@ -347,6 +347,18 @@ impl MimeMessage {
347
347
}
348
348
349
349
decrypted_msg = Some ( msg) ;
350
+
351
+ if let Some ( protected_timestamp_sent) = decrypted_mail
352
+ . headers
353
+ . get_header_value ( HeaderDef :: Date )
354
+ . and_then ( |v| mailparse:: dateparse ( & v) . ok ( ) )
355
+ {
356
+ timestamp_sent = min (
357
+ protected_timestamp_sent,
358
+ timestamp_rcvd + constants:: TIMESTAMP_SENT_TOLERANCE ,
359
+ )
360
+ }
361
+
350
362
if let Some ( protected_aheader_value) = decrypted_mail
351
363
. headers
352
364
. get_header_value ( HeaderDef :: Autocrypt )
You can’t perform that action at this time.
0 commit comments