From f71ee665320d142a48954dcb4d1680bddf61e082 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 29 Oct 2020 16:28:30 +0100 Subject: [PATCH] Update upgrader notification action to recent update --- updates/upgrader.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/updates/upgrader.go b/updates/upgrader.go index a5b5398d..cde189e7 100644 --- a/updates/upgrader.go +++ b/updates/upgrader.go @@ -119,7 +119,7 @@ func upgradeCoreNotify() error { return nil } -func upgradeCoreNotifyActionHandler(n *notifications.Notification) { +func upgradeCoreNotifyActionHandler(_ context.Context, n *notifications.Notification) error { switch n.SelectedActionID { case "restart": // Cannot directly trigger due to import loop. @@ -133,8 +133,10 @@ func upgradeCoreNotifyActionHandler(n *notifications.Notification) { log.Warningf("updates: failed to trigger restart via notification: %s", err) } case "later": - n.Expires = time.Now().Unix() // expire immediately + n.Delete() } + + return nil } func upgradeHub() error {