feat: Tag agents in a private note (#1688)

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2021-01-27 00:04:11 +05:30
committed by GitHub
parent b894b13e14
commit b93388b330
20 changed files with 424 additions and 93 deletions

View File

@@ -19,6 +19,16 @@ class AgentNotifications::ConversationNotificationsMailer < ApplicationMailer
send_mail_with_liquid(to: @agent.email, subject: subject) and return
end
def conversation_mention(message, agent)
return unless smtp_config_set_or_development?
@agent = agent
@conversation = message.conversation
subject = "#{@agent.available_name}, You have been mentioned in conversation [ID - #{@conversation.display_id}]"
@action_url = app_account_conversation_url(account_id: @conversation.account_id, id: @conversation.display_id)
send_mail_with_liquid(to: @agent.email, subject: subject) and return
end
def assigned_conversation_new_message(conversation, agent)
return unless smtp_config_set_or_development?
# Don't spam with email notifications if agent is online