diff --git a/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb b/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb index 0ea0f301b17d8..db4bf3a4a2d23 100644 --- a/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb +++ b/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb @@ -1,13 +1,19 @@ <% @messages.each do |message| %> - <%= message.sender&.try(:available_name) || message.sender&.name || '' %> + <% if message.outgoing? %> + Kundtjänst + <% else %> + <%= message.sender&.try(:available_name) || message.sender&.name || '' %> + <% end %> <% if message.conversation.inbox&.inbox_type == 'Email' %>
- <% if message.content_attributes.dig(:email, :from).present? %> -
From: <%= message.content_attributes.dig(:email, :from).join(", ") %>
- <% else %> -
From: <%= message.sender&.try(:email) %>
+ <% if !message.outgoing? %> + <% if message.content_attributes.dig(:email, :from).present? %> +
From: <%= message.content_attributes.dig(:email, :from).join(", ") %>
+ <% else %> +
From: <%= message.sender&.try(:email) %>
+ <% end %> <% end %> <% if message.content_attributes.dig(:email, :subject).present? %>