feat: Use display_name instead of name of the agent (#1097)

* feat: Use display_name instead of name of the agent
This commit is contained in:
Pranav Raj S
2020-07-27 22:19:26 +05:30
committed by GitHub
parent f30c8943d9
commit 2b1d445003
21 changed files with 80 additions and 41 deletions

View File

@@ -56,7 +56,7 @@ class ConversationReplyMailer < ApplicationMailer
def reply_email
if inbound_email_enabled?
"#{@agent.name} <reply+#{@conversation.uuid}@#{current_domain}>"
"#{@agent.available_name} <reply+#{@conversation.uuid}@#{current_domain}>"
else
@agent&.email
end
@@ -64,9 +64,9 @@ class ConversationReplyMailer < ApplicationMailer
def from_email
if inbound_email_enabled?
"#{@agent.name} <#{account_support_email}>"
"#{@agent.available_name} <#{account_support_email}>"
else
"#{@agent.name} <#{ENV.fetch('MAILER_SENDER_EMAIL', 'accounts@chatwoot.com')}>"
"#{@agent.available_name} <#{ENV.fetch('MAILER_SENDER_EMAIL', 'accounts@chatwoot.com')}>"
end
end