mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Fixed some issues around the tv requests area
Added mattermost and telegram notifications #1459 #865 #1457
This commit is contained in:
parent
03e9852330
commit
bf043fc76e
48 changed files with 1164 additions and 192 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue