Skip to content

Commit

Permalink
feat: Add information about email in the transcript (#9020)
Browse files Browse the repository at this point in the history
  • Loading branch information
scmmishra committed Mar 7, 2024
1 parent 505ede2 commit 9f70b93
Showing 1 changed file with 23 additions and 0 deletions.
Expand Up @@ -2,6 +2,29 @@
<tr>
<td>
<b><%= message.sender&.try(:available_name) || message.sender&.name || '' %></b>
<% if message.conversation.inbox&.inbox_type == 'Email' %>
<div style="font-size: 90%; color: #899096; line-height: 16px">
<% if message.content_attributes.dig(:email, :from).present? %>
<div>From: <%= message.content_attributes.dig(:email, :from).join(", ") %></div>
<% else %>
<div>From: <%= message.sender&.try(:email) %></div>
<% end %>
<% if message.content_attributes.dig(:email, :subject).present? %>
<div>Subject: <%= message.content_attributes.dig(:email, :subject) %></div>
<% end %>
<% if message.content_attributes[:to_emails].present? %>
<div>To: <%= message.content_attributes[:to_emails].join(", ") %></div>
<% end %>
<% if message.content_attributes[:cc_emails].present? %>
<div>CC: <%= message.content_attributes[:cc_emails].join(", ") %></div>
<% end %>
<% if message.content_attributes[:bcc_emails].present? %>
<div>BCC: <%= message.content_attributes[:bcc_emails].join(", ") %></div>
<% end %>
</div>
<% end %>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 9f70b93

Please sign in to comment.