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
|
|
|
|
|
2020-06-14 23:47:11 -05:00
|
|
|
|
namespace BTCPayServer.Services.Notifications.Blobs
|
2020-05-27 18:41:00 -05:00
|
|
|
|
{
|
2020-06-15 17:05:12 +09:00
|
|
|
|
[Notification("newversion")]
|
2020-06-14 23:48:58 -05:00
|
|
|
|
internal class NewVersionNotification : BaseNotification
|
2020-05-27 18:41:00 -05:00
|
|
|
|
{
|
2020-06-15 16:45:29 +09:00
|
|
|
|
public NewVersionNotification()
|
|
|
|
|
{
|
2020-06-13 18:40:30 -05:00
|
|
|
|
|
2020-06-15 16:45:29 +09:00
|
|
|
|
}
|
|
|
|
|
public NewVersionNotification(string version)
|
|
|
|
|
{
|
|
|
|
|
Version = version;
|
|
|
|
|
}
|
2020-05-27 18:41:00 -05:00
|
|
|
|
public string Version { get; set; }
|
2020-06-11 01:00:41 -05:00
|
|
|
|
|
2020-06-15 17:05:12 +09: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
|
|
|
|
}
|
|
|
|
|
}
|