#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

@ -102,10 +102,6 @@ namespace Ombi.Store.Context
//Check if templates exist
var templates = NotificationTemplates.ToList();
//if (templates.Any())
//{
// return;
//}
var allAgents = Enum.GetValues(typeof(NotificationAgent)).Cast<NotificationAgent>().ToList();
var allTypes = Enum.GetValues(typeof(NotificationType)).Cast<NotificationType>().ToList();
@ -162,8 +158,6 @@ namespace Ombi.Store.Context
Enabled = true,
};
break;
case NotificationType.AdminNote:
continue;
case NotificationType.Test:
continue;
case NotificationType.RequestDeclined:
@ -188,6 +182,16 @@ namespace Ombi.Store.Context
Enabled = true,
};
break;
case NotificationType.IssueResolved:
notificationToAdd = new NotificationTemplates
{
NotificationType = notificationType,
Message = "Hello {RequestedUser} Your issue for {Title} has now been resolved.",
Subject = "{ApplicationName}: Issue has been resolved for {Title}!",
Agent = agent,
Enabled = true,
};
break;
default:
throw new ArgumentOutOfRangeException();
}