chore: fix sla email notifications (#9192)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Vishnu Narayanan
2024-04-05 02:46:49 +11:00
committed by GitHub
parent 18bfda35b3
commit fa3bc05d3d
4 changed files with 10 additions and 4 deletions

View File

@@ -29,4 +29,10 @@ module Enterprise::AgentNotifications::ConversationNotificationsMailer
@action_url = app_account_conversation_url(account_id: @conversation.account_id, id: @conversation.display_id)
send_mail_with_liquid(to: @agent.email, subject: "Conversation [ID - #{@conversation.display_id}] missed SLA for resolution time") and return
end
def liquid_droppables
super.merge({
sla_policy: @sla_policy
})
end
end

View File

@@ -50,6 +50,7 @@ class Sla::EvaluateAppliedSlaService
end
def get_last_message_id(conversation)
# TODO: refactor the method to fetch last message without reply
conversation.messages.where(message_type: :incoming).last&.id
end