feat: add references header to reply emails (#11719)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Shivam Mishra
2025-07-29 14:24:14 +04:00
committed by GitHub
parent 441cc065ae
commit 6475a6a593
10 changed files with 449 additions and 17 deletions

View File

@@ -100,6 +100,7 @@ class MailPresenter < SimpleDelegator
message_id: message_id,
multipart: multipart?,
number_of_attachments: number_of_attachments,
references: references,
subject: subject,
text_content: text_content,
to: to
@@ -115,6 +116,12 @@ class MailPresenter < SimpleDelegator
@mail.in_reply_to.is_a?(Array) ? @mail.in_reply_to.first : @mail.in_reply_to
end
def references
return [] if @mail.references.blank?
Array.wrap(@mail.references)
end
def from
# changing to downcase to avoid case mismatch while finding contact
(@mail.reply_to.presence || @mail.from).map(&:downcase)