2020-06-11 18:14:23 -05:00
|
|
|
|
using BTCPayServer.Data;
|
2020-06-11 01:00:41 -05:00
|
|
|
|
using BTCPayServer.Models.NotificationViewModels;
|
|
|
|
|
using Newtonsoft.Json;
|
2020-05-27 18:41:00 -05:00
|
|
|
|
|
|
|
|
|
namespace BTCPayServer.Events.Notifications
|
|
|
|
|
{
|
2020-06-11 23:52:46 -05:00
|
|
|
|
internal class NewVersionNotification : NotificationBase
|
2020-05-27 18:41:00 -05:00
|
|
|
|
{
|
2020-06-13 18:40:30 -05:00
|
|
|
|
internal override string NotificationType => "NewVersionNotification";
|
|
|
|
|
|
2020-05-27 18:41:00 -05:00
|
|
|
|
public string Version { get; set; }
|
2020-06-11 01:00:41 -05:00
|
|
|
|
|
2020-06-14 23:17:21 -05:00
|
|
|
|
public override void FillViewModel(NotificationViewModel vm)
|
2020-06-11 01:00:41 -05:00
|
|
|
|
{
|
2020-06-14 23:17:21 -05:00
|
|
|
|
vm.Body = $"New version {Version} released!";
|
|
|
|
|
vm.ActionLink = $"https://github.com/btcpayserver/btcpayserver/releases/tag/v{Version}";
|
2020-06-11 01:00:41 -05:00
|
|
|
|
}
|
2020-05-27 18:41:00 -05:00
|
|
|
|
}
|
|
|
|
|
}
|