TF-2331 Fix Read receipt includes weird attachments that are impossible to download

(cherry picked from commit 72ae6553ea53fa4bbba74bfdb1c9a3ec82103fc0)
This commit is contained in:
dab246
2023-11-22 16:21:35 +07:00
committed by Dat H. Pham
parent 34db6f893d
commit a352bd5ada
7 changed files with 25 additions and 11 deletions
@@ -1,6 +1,7 @@
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
import 'package:model/extensions/email_extension.dart';
import 'package:model/extensions/list_attachment_extension.dart';
import 'package:tmail_ui_user/features/email/domain/model/detailed_email.dart';
extension EmailExtension on Email {
@@ -8,7 +9,7 @@ extension EmailExtension on Email {
return DetailedEmail(
emailId: id!,
createdTime: receivedAt?.value ?? DateTime.now(),
attachments: allAttachments,
attachments: allAttachments.getListAttachmentsDisplayedOutside(htmlBodyAttachments),
headers: headers,
keywords: keywords,
htmlEmailContent: htmlEmailContent,