#1914 for the issue resolved notification

This commit is contained in:
Jamie 2018-01-22 08:31:50 +00:00
parent 2551175867
commit 48ec5d700c
12 changed files with 149 additions and 20 deletions

View file

@ -92,7 +92,7 @@ namespace Ombi.Notifications.Agents
await Send(message, settings);
}
protected override async Task Issue(NotificationOptions model, EmailNotificationSettings settings)
protected override async Task NewIssue(NotificationOptions model, EmailNotificationSettings settings)
{
var message = await LoadTemplate(NotificationType.Issue, model, settings);
if (message == null)
@ -109,6 +109,23 @@ namespace Ombi.Notifications.Agents
await Send(message, settings);
}
protected override async Task IssueResolved(NotificationOptions model, EmailNotificationSettings settings)
{
var message = await LoadTemplate(NotificationType.IssueResolved, model, settings);
if (message == null)
{
return;
}
var plaintext = await LoadPlainTextMessage(NotificationType.IssueResolved, model, settings);
message.Other.Add("PlainTextBody", plaintext);
// Issues should be sent to admin
message.To = settings.AdminEmail;
await Send(message, settings);
}
protected override async Task AddedToRequestQueue(NotificationOptions model, EmailNotificationSettings settings)
{
var email = new EmailBasicTemplate();