TF-1608 Add messageId/inReplyTo/references to properties in jmap request get email content

(cherry picked from commit 2948f3f19aa9727dd19fdef08085d434daac1945)
This commit is contained in:
dab246
2023-09-20 15:03:49 +07:00
committed by Dat H. Pham
parent ebae1fc4e0
commit c198b4e21d
3 changed files with 14 additions and 6 deletions
@@ -93,13 +93,15 @@ class EmailAPI with HandleSetErrorMixin {
.execute();
final resultList = result.parse<GetEmailResponse>(
getEmailInvocation.methodCallId, GetEmailResponse.deserialize);
getEmailInvocation.methodCallId,
GetEmailResponse.deserialize
);
return Future.sync(() async {
if (resultList?.list.isNotEmpty == true) {
return resultList!.list.first;
}).catchError((error) {
throw error;
});
} else {
throw NotFoundEmailException();
}
}
Future<bool> sendEmail(
@@ -45,7 +45,10 @@ class ThreadConstants {
EmailProperty.attachments,
EmailProperty.headers,
EmailProperty.keywords,
EmailProperty.mailboxIds
EmailProperty.mailboxIds,
EmailProperty.messageId,
EmailProperty.inReplyTo,
EmailProperty.references,
});
static final propertiesGetDetailedEmail = Properties({
+3
View File
@@ -19,4 +19,7 @@ class EmailProperty {
static const String attachments = 'attachments';
static const String headers = 'headers';
static const String headerMdnKey = 'Disposition-Notification-To';
static const String messageId = 'messageId';
static const String inReplyTo = 'inReplyTo';
static const String references = 'references';
}