TF-1923 Add createdTime for DetailedEmail

(cherry picked from commit 817c35849338c483feaa2a68586b162a8a67b9a2)
This commit is contained in:
dab246
2023-06-21 01:38:19 +07:00
committed by Dat H. Pham
parent 4ea620cc2b
commit 5faab2c306
21 changed files with 57 additions and 39 deletions
@@ -11,7 +11,7 @@ extension DetailedEmailExtension on DetailedEmail {
DetailedEmailHiveCache toHiveCache() {
return DetailedEmailHiveCache(
emailId: emailId.asString,
timeSaved: DateTime.now(),
timeSaved: createdTime,
attachments: attachments?.toHiveCache(),
headers: headers?.toList().toHiveCache(),
keywords: keywords?.toMapString(),
@@ -26,6 +26,7 @@ extension DetailedEmailExtension on DetailedEmail {
DetailedEmail fromEmailContentPath(String path) {
return DetailedEmail(
emailId: emailId,
createdTime: createdTime,
attachments: attachments,
headers: headers,
keywords: keywords,
@@ -10,6 +10,7 @@ extension DetailedEmailHiveCacheExtension on DetailedEmailHiveCache {
DetailedEmail toDetailedEmailWithContent(String emailContent) {
return DetailedEmail(
emailId: EmailId(Id(emailId)),
createdTime: timeSaved,
attachments: attachments?.toAttachment(),
headers: headers?.toSetEmailHeader(),
keywords: keywords != null
@@ -7,6 +7,7 @@ extension EmailExtension on Email {
DetailedEmail toDetailedEmail({String? htmlEmailContent}) {
return DetailedEmail(
emailId: id!,
createdTime: DateTime.now(),
attachments: allAttachments,
headers: headers,
keywords: keywords,