mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
parent
8cbf2ab707
commit
b2d5996d52
17 changed files with 184 additions and 33 deletions
|
@ -45,7 +45,11 @@ namespace Ombi.Notifications.Agents
|
|||
protected override async Task NewRequest(NotificationOptions model, PushbulletSettings settings)
|
||||
{
|
||||
var parsed = await LoadTemplate(NotificationAgent.Pushbullet, NotificationType.NewRequest, model);
|
||||
|
||||
if (parsed.Disabled)
|
||||
{
|
||||
Logger.LogInformation($"Template {NotificationType.NewRequest} is disabled for {NotificationAgent.Pushbullet}");
|
||||
return;
|
||||
}
|
||||
var notification = new NotificationMessage
|
||||
{
|
||||
Message = parsed.Message,
|
||||
|
@ -57,7 +61,11 @@ namespace Ombi.Notifications.Agents
|
|||
protected override async Task Issue(NotificationOptions model, PushbulletSettings settings)
|
||||
{
|
||||
var parsed = await LoadTemplate(NotificationAgent.Pushbullet, NotificationType.Issue, model);
|
||||
|
||||
if (parsed.Disabled)
|
||||
{
|
||||
Logger.LogInformation($"Template {NotificationType.Issue} is disabled for {NotificationAgent.Pushbullet}");
|
||||
return;
|
||||
}
|
||||
var notification = new NotificationMessage
|
||||
{
|
||||
Message = parsed.Message,
|
||||
|
@ -90,7 +98,11 @@ namespace Ombi.Notifications.Agents
|
|||
protected override async Task RequestDeclined(NotificationOptions model, PushbulletSettings settings)
|
||||
{
|
||||
var parsed = await LoadTemplate(NotificationAgent.Pushbullet, NotificationType.RequestDeclined, model);
|
||||
|
||||
if (parsed.Disabled)
|
||||
{
|
||||
Logger.LogInformation($"Template {NotificationType.RequestDeclined} is disabled for {NotificationAgent.Pushbullet}");
|
||||
return;
|
||||
}
|
||||
var notification = new NotificationMessage
|
||||
{
|
||||
Message = parsed.Message,
|
||||
|
@ -101,7 +113,11 @@ namespace Ombi.Notifications.Agents
|
|||
protected override async Task RequestApproved(NotificationOptions model, PushbulletSettings settings)
|
||||
{
|
||||
var parsed = await LoadTemplate(NotificationAgent.Pushbullet, NotificationType.RequestApproved, model);
|
||||
|
||||
if (parsed.Disabled)
|
||||
{
|
||||
Logger.LogInformation($"Template {NotificationType.RequestApproved} is disabled for {NotificationAgent.Pushbullet}");
|
||||
return;
|
||||
}
|
||||
var notification = new NotificationMessage
|
||||
{
|
||||
Message = parsed.Message,
|
||||
|
@ -113,7 +129,11 @@ namespace Ombi.Notifications.Agents
|
|||
protected override async Task AvailableRequest(NotificationOptions model, PushbulletSettings settings)
|
||||
{
|
||||
var parsed = await LoadTemplate(NotificationAgent.Pushbullet, NotificationType.RequestAvailable, model);
|
||||
|
||||
if (parsed.Disabled)
|
||||
{
|
||||
Logger.LogInformation($"Template {NotificationType.RequestAvailable} is disabled for {NotificationAgent.Pushbullet}");
|
||||
return;
|
||||
}
|
||||
var notification = new NotificationMessage
|
||||
{
|
||||
Message = parsed.Message,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue