feat: preserve original email timestamp when importing emails
This commit is contained in:
@@ -102,7 +102,7 @@ class Imap::ImapMailbox
|
||||
auto_reply: @processed_mail.auto_reply?,
|
||||
mail_subject: @processed_mail.subject,
|
||||
initiated_at: {
|
||||
timestamp: Time.now.utc
|
||||
timestamp: @processed_mail.date&.utc || Time.now.utc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ module MailboxHelper
|
||||
message_type: 'incoming',
|
||||
content_type: 'incoming_email',
|
||||
source_id: processed_mail.message_id,
|
||||
created_at: processed_mail.date&.utc || Time.current,
|
||||
content_attributes: {
|
||||
email: processed_mail.serialized_data,
|
||||
cc_email: processed_mail.cc,
|
||||
|
||||
Reference in New Issue
Block a user