fix: Use available_name only (#7312)

We have display_name and the actual name for an agent. display_name is used in all public facing parts. The https://github.com/chatwoot/chatwoot/pull/7232/files PR missed this and used actual name instead.

This PR fixes it.
This commit is contained in:
Pranav Raj S
2023-06-15 05:22:53 -07:00
committed by GitHub
parent cac9fe1880
commit 69b9123963
2 changed files with 9 additions and 9 deletions

View File

@@ -80,11 +80,11 @@ class ConversationReplyMailer < ApplicationMailer
end
def sender_name
@sender_name ||= current_message&.sender&.name || @agent&.available_name || 'Notifications'
@sender_name ||= current_message&.sender&.available_name || @agent&.available_name || 'Notifications'
end
def current_message
@message || @messages.last
@message || @conversation.messages.outgoing.last
end
def mail_subject