btcpayserver/BTCPayServer/Services/Notifications/Blobs/NewVersionNotification.cs

27 lines
871 B
C#
Raw Normal View History

using BTCPayServer.Models.NotificationViewModels;
namespace BTCPayServer.Services.Notifications.Blobs
{
2020-06-16 23:29:25 +09:00
internal class NewVersionNotification
{
2020-06-16 23:29:25 +09:00
internal class Handler : NotificationHandler<NewVersionNotification>
{
public override string NotificationType => "newversion";
protected override void FillViewModel(NewVersionNotification notification, NotificationViewModel vm)
{
vm.Body = $"New version {notification.Version} released!";
vm.ActionLink = $"https://github.com/btcpayserver/btcpayserver/releases/tag/v{notification.Version}";
}
}
public NewVersionNotification()
{
}
public NewVersionNotification(string version)
{
Version = version;
}
public string Version { get; set; }
}
}