mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 11:38:32 -07:00
#1914 for the issue resolved notification
This commit is contained in:
parent
2551175867
commit
48ec5d700c
12 changed files with 149 additions and 20 deletions
|
@ -92,7 +92,7 @@ namespace Ombi.Notifications.Agents
|
|||
await Send(message, settings);
|
||||
}
|
||||
|
||||
protected override async Task Issue(NotificationOptions model, EmailNotificationSettings settings)
|
||||
protected override async Task NewIssue(NotificationOptions model, EmailNotificationSettings settings)
|
||||
{
|
||||
var message = await LoadTemplate(NotificationType.Issue, model, settings);
|
||||
if (message == null)
|
||||
|
@ -109,6 +109,23 @@ namespace Ombi.Notifications.Agents
|
|||
await Send(message, settings);
|
||||
}
|
||||
|
||||
protected override async Task IssueResolved(NotificationOptions model, EmailNotificationSettings settings)
|
||||
{
|
||||
var message = await LoadTemplate(NotificationType.IssueResolved, model, settings);
|
||||
if (message == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var plaintext = await LoadPlainTextMessage(NotificationType.IssueResolved, model, settings);
|
||||
message.Other.Add("PlainTextBody", plaintext);
|
||||
|
||||
// Issues should be sent to admin
|
||||
message.To = settings.AdminEmail;
|
||||
|
||||
await Send(message, settings);
|
||||
}
|
||||
|
||||
protected override async Task AddedToRequestQueue(NotificationOptions model, EmailNotificationSettings settings)
|
||||
{
|
||||
var email = new EmailBasicTemplate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue