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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user