Also added new notification variables and a new notification when someone adds a comment on an issue.
This commit is contained in:
tidusjar 2018-02-07 23:30:23 +00:00
parent b223306ee8
commit 480a107fa6
15 changed files with 322 additions and 42 deletions

View file

@ -69,6 +69,21 @@ namespace Ombi.Notifications.Agents
await Send(notification, settings);
}
protected override async Task IssueComment(NotificationOptions model, TelegramSettings settings)
{
var parsed = await LoadTemplate(NotificationAgent.Telegram, NotificationType.IssueComment, model);
if (parsed.Disabled)
{
Logger.LogInformation($"Template {NotificationType.IssueComment} is disabled for {NotificationAgent.Telegram}");
return;
}
var notification = new NotificationMessage
{
Message = parsed.Message,
};
await Send(notification, settings);
}
protected override async Task IssueResolved(NotificationOptions model, TelegramSettings settings)
{
var parsed = await LoadTemplate(NotificationAgent.Telegram, NotificationType.IssueResolved, model);