Fixed some issues around the tv requests area

Added mattermost and telegram notifications #1459 #865 #1457
This commit is contained in:
tidusjar 2017-08-21 17:06:07 +01:00
parent 03e9852330
commit bf043fc76e
48 changed files with 1164 additions and 192 deletions

View file

@ -71,18 +71,23 @@ namespace Ombi.Store.Context
}
// Check if templates exist
//Check if templates exist
var templates = NotificationTemplates.ToList();
if (templates.Any())
{
return;
}
//if (templates.Any())
//{
// return;
//}
var allAgents = Enum.GetValues(typeof(NotificationAgent)).Cast<NotificationAgent>().ToList();
var allTypes = Enum.GetValues(typeof(NotificationType)).Cast<NotificationType>().ToList();
foreach (var agent in allAgents)
{
if (templates.Any(x => x.Agent == agent))
{
// We have all the templates for this notification agent
continue;
}
foreach (var notificationType in allTypes)
{
NotificationTemplates notificationToAdd;