Skip to content

Commit

Permalink
mask agent name and email
Browse files Browse the repository at this point in the history
  • Loading branch information
jderecho committed Jun 12, 2024
1 parent 1e49ecf commit c2d59dc
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<% @messages.each do |message| %>
<tr>
<td>
<b><%= message.sender&.try(:available_name) || message.sender&.name || '' %></b>
<% if message.outgoing? %>
<b>Kundtjänst</b>
<% else %>
<b><%= message.sender&.try(:available_name) || message.sender&.name || '' %></b>
<% end %>
<% 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>
<% if !message.outgoing? %>
<% 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 %>
<% end %>

<% if message.content_attributes.dig(:email, :subject).present? %>
Expand Down

0 comments on commit c2d59dc

Please sign in to comment.