- <% sender_name = sender.try(:available_name) || sender&.name || ''%>
+ <% sender_name = message.sender&.try(:available_name) || message.sender&.name %>
<% if @inbox.email? %>
- From: <%= sender_name %> <%= "<#{message.sender&.email}>" %>
- Subject: <%= message.conversation.additional_attributes&.dig('mail_subject') %>
+ <% if sender_name.present? %>
+ From:
+ <%= sender_name %> <%= "<#{message.sender&.email}>" %>
+
+ <% end %>
+ <% if @conversation_subject.present? %>
+ Subject:
+ <%= @conversation_subject %>
+
+ <% end %>
<% else %>
<%= sender_name %>
<% end %>
From 272f92cfdf1ac82b5319e975fea4011818987409 Mon Sep 17 00:00:00 2001
From: John Manuel Derecho
Date: Sat, 9 Sep 2023 13:13:12 +0800
Subject: [PATCH 013/256] feature 5474 update
---
app/mailers/conversation_reply_mailer.rb | 2 +-
.../conversation_transcript.html.erb | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/app/mailers/conversation_reply_mailer.rb b/app/mailers/conversation_reply_mailer.rb
index 94cff2efcc0e4..99749ea9597fb 100644
--- a/app/mailers/conversation_reply_mailer.rb
+++ b/app/mailers/conversation_reply_mailer.rb
@@ -44,7 +44,7 @@ def conversation_transcript(conversation, to_email)
init_conversation_attributes(conversation)
@messages = @conversation.messages.chat.select(&:conversation_transcriptable?)
- @conversation_subject = @conversation.additional_attributes&.dig('mail_subject')
+
mail({
to: to_email,
from: from_email_with_name,
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 c2d8f8929fbd3..bca9325e98451 100644
--- a/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb
+++ b/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb
@@ -4,13 +4,12 @@
<% sender_name = message.sender&.try(:available_name) || message.sender&.name %>
<% if @inbox.email? %>
<% if sender_name.present? %>
- From:
- <%= sender_name %> <%= "<#{message.sender&.email}>" %>
+ From: <%= sender_name %> <%= "<#{message.sender&.email}>" %>
<% end %>
- <% if @conversation_subject.present? %>
- Subject:
- <%= @conversation_subject %>
+ <% subject = message.conversation&.additional_attributes&.dig('mail_subject')%>
+ <% if subject.present? %>
+ Subject: <%= subject %>
<% end %>
<% else %>
From c748d77c118022c03e186f6564a39c011a4a72b3 Mon Sep 17 00:00:00 2001
From: John Manuel Derecho
Date: Sat, 9 Sep 2023 14:27:53 +0800
Subject: [PATCH 014/256] feature 7675 update
---
.../api/v1/accounts/inboxes_controller.rb | 2 +-
.../dashboard/i18n/locale/en/inboxMgmt.json | 6 ---
.../dashboard/settings/inbox/Settings.vue | 33 -------------
app/mailers/conversation_reply_mailer.rb | 2 +-
app/models/inbox.rb | 49 +++++++++----------
app/views/api/v1/models/_inbox.json.jbuilder | 1 -
...3110_add_reply_with_original_to_message.rb | 5 --
db/schema.rb | 3 +-
.../mailers/conversation_reply_mailer_spec.rb | 6 +--
9 files changed, 26 insertions(+), 81 deletions(-)
delete mode 100644 db/migrate/20230807093110_add_reply_with_original_to_message.rb
diff --git a/app/controllers/api/v1/accounts/inboxes_controller.rb b/app/controllers/api/v1/accounts/inboxes_controller.rb
index 39f683e42c8d2..011faaf280085 100644
--- a/app/controllers/api/v1/accounts/inboxes_controller.rb
+++ b/app/controllers/api/v1/accounts/inboxes_controller.rb
@@ -122,7 +122,7 @@ def update_channel_feature_flags
end
def inbox_attributes
- [:name, :avatar, :greeting_enabled, :greeting_message, :enable_email_collect, :enable_reply_with_original_message, :csat_survey_enabled,
+ [:name, :avatar, :greeting_enabled, :greeting_message, :enable_email_collect, :csat_survey_enabled,
:enable_auto_assignment, :working_hours_enabled, :out_of_office_message, :timezone, :allow_messages_after_resolved,
:lock_to_single_conversation, :portal_id, :sender_name_type, :business_name]
end
diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json
index d1780f0ff49cd..99ac944a86436 100644
--- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json
+++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json
@@ -290,12 +290,6 @@
"SUBTITLE": "Provide the email address where your customers send support requests.",
"PLACEHOLDER": "Email"
},
- "REPLY_WITH_ORIGINAL_MESSAGE_TOGGLE": {
- "LABEL": "Show sender their original message when replying",
- "HELP_TEXT": "This setting will copy their previous message when replying so that sender can see what the agent is replying to",
- "ENABLED": "Enabled",
- "DISABLED": "Disabled"
- },
"SUBMIT_BUTTON": "Create Email Channel",
"API": {
"ERROR_MESSAGE": "We were not able to save the email channel"
diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue
index e60c44b0f42fb..dcac0c66e0ff0 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue
@@ -208,36 +208,6 @@
}}
-
+
|