feat: Add send message, fix issues with message conditions (#4423)

Co-authored-by: Tejaswini <tejaswini@chatwoot.com>
This commit is contained in:
Fayaz Ahmed
2022-04-14 13:36:55 +05:30
committed by GitHub
parent d4be268cc3
commit 337a74a10c
15 changed files with 231 additions and 86 deletions

View File

@@ -7,29 +7,7 @@ class TeamNotifications::AutomationNotificationMailer < ApplicationMailer
@custom_message = message
@action_url = app_account_conversation_url(account_id: @conversation.account_id, id: @conversation.display_id)
send_an_email_to_team and return
end
def conversation_updated(conversation, team, message)
return unless smtp_config_set_or_development?
@agents = team.team_members
@conversation = conversation
@custom_message = message
@action_url = app_account_conversation_url(account_id: @conversation.account_id, id: @conversation.display_id)
send_an_email_to_team and return
end
def message_created(conversation, team, message)
return unless smtp_config_set_or_development?
@agents = team.team_members
@conversation = conversation
@custom_message = message
@action_url = app_account_conversation_url(account_id: @conversation.account_id, id: @conversation.display_id)
send_an_email_to_team and return
send_an_email_to_team
end
private