Skip to content

Commit

Permalink
fix(notifications): 🐛 Do not notify user upon auto approval of a TV s…
Browse files Browse the repository at this point in the history
…how (#4432)

Fixes #4431
  • Loading branch information
sephrat authored Dec 8, 2021
1 parent 8943a97 commit 3ad3bdd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Ombi.Core/Engine/TvRequestEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,11 @@ public async Task<RequestEngineResult> ApproveChildRequest(int id)

if (request.Approved)
{
await NotificationHelper.Notify(request, NotificationType.RequestApproved);
var canNotify = await RunSpecificRule(request, SpecificRules.CanSendNotification, string.Empty);
if (canNotify.Success)
{
await NotificationHelper.Notify(request, NotificationType.RequestApproved);
}
// Autosend
await TvSender.Send(request);
}
Expand Down Expand Up @@ -957,7 +961,11 @@ private async Task<RequestEngineResult> ProcessSendingShow(ChildRequests model)
if (model.Approved)
{
// Autosend
await NotificationHelper.Notify(model, NotificationType.RequestApproved);
var canNotify = await RunSpecificRule(model, SpecificRules.CanSendNotification, string.Empty);
if (canNotify.Success)
{
await NotificationHelper.Notify(model, NotificationType.RequestApproved);
}
var result = await TvSender.Send(model);
if (result.Success)
{
Expand Down

0 comments on commit 3ad3bdd

Please sign in to comment.