TF-1608 Add messageId/inReplyTo/references to properties in jmap request get email content
(cherry picked from commit 2948f3f19aa9727dd19fdef08085d434daac1945)
This commit is contained in:
@@ -93,13 +93,15 @@ class EmailAPI with HandleSetErrorMixin {
|
|||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
final resultList = result.parse<GetEmailResponse>(
|
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;
|
return resultList!.list.first;
|
||||||
}).catchError((error) {
|
} else {
|
||||||
throw error;
|
throw NotFoundEmailException();
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> sendEmail(
|
Future<bool> sendEmail(
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ class ThreadConstants {
|
|||||||
EmailProperty.attachments,
|
EmailProperty.attachments,
|
||||||
EmailProperty.headers,
|
EmailProperty.headers,
|
||||||
EmailProperty.keywords,
|
EmailProperty.keywords,
|
||||||
EmailProperty.mailboxIds
|
EmailProperty.mailboxIds,
|
||||||
|
EmailProperty.messageId,
|
||||||
|
EmailProperty.inReplyTo,
|
||||||
|
EmailProperty.references,
|
||||||
});
|
});
|
||||||
|
|
||||||
static final propertiesGetDetailedEmail = Properties({
|
static final propertiesGetDetailedEmail = Properties({
|
||||||
|
|||||||
@@ -19,4 +19,7 @@ class EmailProperty {
|
|||||||
static const String attachments = 'attachments';
|
static const String attachments = 'attachments';
|
||||||
static const String headers = 'headers';
|
static const String headers = 'headers';
|
||||||
static const String headerMdnKey = 'Disposition-Notification-To';
|
static const String headerMdnKey = 'Disposition-Notification-To';
|
||||||
|
static const String messageId = 'messageId';
|
||||||
|
static const String inReplyTo = 'inReplyTo';
|
||||||
|
static const String references = 'references';
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user