mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Finished the notification for the fault queue
This commit is contained in:
parent
c5b65a335f
commit
bcfd675d3d
3 changed files with 34 additions and 0 deletions
|
@ -88,6 +88,11 @@ namespace PlexRequests.Services.Notification
|
|||
case NotificationType.Test:
|
||||
await PushTest(pushSettings);
|
||||
break;
|
||||
case NotificationType.RequestDeclined:
|
||||
break;
|
||||
case NotificationType.ItemAddedToFaultQueue:
|
||||
await PushFaultQueue(model, pushSettings);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
@ -111,6 +116,12 @@ namespace PlexRequests.Services.Notification
|
|||
await Push(settings, message);
|
||||
}
|
||||
|
||||
private async Task PushFaultQueue(NotificationModel model, SlackNotificationSettings settings)
|
||||
{
|
||||
var message = $"Hello! The user '{model.User}' has requested {model.Title} but it could not be added. This has been added into the requests queue and will keep retrying";
|
||||
await Push(settings, message);
|
||||
}
|
||||
|
||||
private async Task Push(SlackNotificationSettings config, string message)
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue