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