mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -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
|
@ -68,7 +68,7 @@ namespace Ombi.Notifications.Agents
|
|||
await Send(notification, settings);
|
||||
}
|
||||
|
||||
protected override async Task Issue(NotificationOptions model, DiscordNotificationSettings settings)
|
||||
protected override async Task NewIssue(NotificationOptions model, DiscordNotificationSettings settings)
|
||||
{
|
||||
var parsed = await LoadTemplate(NotificationAgent.Discord, NotificationType.Issue, model);
|
||||
if (parsed.Disabled)
|
||||
|
@ -84,6 +84,22 @@ namespace Ombi.Notifications.Agents
|
|||
await Send(notification, settings);
|
||||
}
|
||||
|
||||
protected override async Task IssueResolved(NotificationOptions model, DiscordNotificationSettings settings)
|
||||
{
|
||||
var parsed = await LoadTemplate(NotificationAgent.Discord, NotificationType.IssueResolved, model);
|
||||
if (parsed.Disabled)
|
||||
{
|
||||
Logger.LogInformation($"Template {NotificationType.IssueResolved} is disabled for {NotificationAgent.Discord}");
|
||||
return;
|
||||
}
|
||||
var notification = new NotificationMessage
|
||||
{
|
||||
Message = parsed.Message,
|
||||
};
|
||||
notification.Other.Add("image", parsed.Image);
|
||||
await Send(notification, settings);
|
||||
}
|
||||
|
||||
protected override async Task AddedToRequestQueue(NotificationOptions model, DiscordNotificationSettings settings)
|
||||
{
|
||||
var user = string.Empty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue