Refresh UI notifications automatically on update (#1680)

* Refresh UI notifications automatically on update

* make notif timeago live

* pass cancellation token

* Update InvoiceEventData.cs
This commit is contained in:
Andrew Camilleri
2020-06-24 10:23:16 +02:00
committed by GitHub
parent 8230a408ac
commit dc5d8a6cb7
9 changed files with 148 additions and 44 deletions

View File

@@ -37,7 +37,10 @@ namespace BTCPayServer.Services.Notifications.Blobs
NotificationViewModel vm)
{
var baseStr = $"Invoice {notification.InvoiceId.Substring(0, 5)}..";
vm.Body = $"{baseStr} {TextMapping[notification.Event]}";
if (TextMapping.ContainsKey(notification.Event))
{
vm.Body = $"{baseStr} {TextMapping[notification.Event]}";
}
vm.ActionLink = _linkGenerator.GetPathByAction(nameof(InvoiceController.Invoice),
"Invoice",
new {invoiceId = notification.InvoiceId}, _options.RootPath);