diff --git a/app/models/conversation.rb b/app/models/conversation.rb index fa59e8d24..e01fb3863 100644 --- a/app/models/conversation.rb +++ b/app/models/conversation.rb @@ -195,6 +195,10 @@ class Conversation < ApplicationRecord messages.chat.last(5) end + def csat_survey_link + "#{ENV.fetch('FRONTEND_URL', nil)}/survey/responses/#{uuid}" + end + private def execute_after_update_commit_callbacks diff --git a/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb b/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb index 34665b777..c6cb77ad2 100644 --- a/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb +++ b/app/views/mailers/conversation_reply_mailer/reply_with_summary.html.erb @@ -5,18 +5,26 @@ <% @messages.each do |message| %>
Click here to rate the conversation.
+ <% elsif message.content.present? %> <%= CommonMarker.render_html(message.content).html_safe %> <% end %> - <% if message.attachments %> - <% message.attachments.each do |attachment| %> - Attachment [Click here to view] - <% end %> + <% if message.attachments.count.positive? %> ++ <% if message.content.present? %> +