feat: add push notification when SLA missed (#9078)

* feat: add push notification when SLA missed

* chore: sent notification only for inbox members

* feat: add conv particpants+admins to SLA notification list

* chore: add spec to ensure notification is created

* chore: refactor to multiple alerts for SLA conditions

* chore: add sla_policy as secondary_actor in notification
This commit is contained in:
Vishnu Narayanan
2024-03-11 21:49:41 +05:30
committed by GitHub
parent 0685e04aae
commit aaf70cf1cf
7 changed files with 114 additions and 19 deletions

View File

@@ -22,4 +22,14 @@ class SlaPolicy < ApplicationRecord
validates :name, presence: true
has_many :conversations, dependent: :nullify
def push_event_data
{
id: id,
name: name,
frt: first_response_time_threshold,
nrt: next_response_time_threshold,
rt: resolution_time_threshold
}
end
end