diff --git a/desktop/app/app.go b/desktop/app/app.go index 3b4eb3d87..0d22427ba 100644 --- a/desktop/app/app.go +++ b/desktop/app/app.go @@ -353,6 +353,7 @@ func (app *App) beforeStart(listenAddr string) { app.Exit(nil) os.Exit(0) } + app.AddExitFunc("stopping notifier", notifier.NotificationsLoop(app.analyticsSession)) } func (app *App) isFeatureEnabled(features map[string]bool, feature string) bool { diff --git a/desktop/notifier/notifier.go b/desktop/notifier/notifier.go index b7a6811f2..ba37babf6 100644 --- a/desktop/notifier/notifier.go +++ b/desktop/notifier/notifier.go @@ -29,8 +29,10 @@ var ( // ShowNotification submits the notification to the notificationsLoop to show // and waits for the result. func ShowNotification(note *notify.Notification, campaign string) bool { + log.Debug("Showing notification") err := normalizeClickURL(note, campaign) if err != nil { + log.Errorf("Could not normalize click URL: %v", err) return false } chResult := make(chan bool) @@ -46,6 +48,7 @@ func ShowNotification(note *notify.Notification, campaign string) bool { func normalizeClickURL(note *notify.Notification, campaign string) error { ga, err := analytics.AddCampaign(note.ClickURL, campaign, note.Title+"-"+note.Message, "notification") if err != nil { + log.Errorf("Could not add campaign: %v", err) return err }