diff --git a/v3/pkg/services/notifications/notifications_linux.go b/v3/pkg/services/notifications/notifications_linux.go index e63fb6bf3..51bcabb5f 100644 --- a/v3/pkg/services/notifications/notifications_linux.go +++ b/v3/pkg/services/notifications/notifications_linux.go @@ -19,7 +19,7 @@ import ( var NotificationLock sync.RWMutex var NotificationCategories = make(map[string]NotificationCategory) var Notifier shout.Notifier -var appName = application.Get().Config().Name +var appName string // Creates a new Notifications Service. func New() *Service { @@ -31,6 +31,8 @@ func New() *Service { // ServiceStartup is called when the service is loaded func (ns *Service) ServiceStartup(ctx context.Context, options application.ServiceOptions) error { + appName = application.Get().Config().Name + if err := loadCategories(); err != nil { fmt.Printf("Failed to load notification categories: %v\n", err) } @@ -47,6 +49,14 @@ func (ns *Service) ServiceStartup(ctx context.Context, options application.Servi return } + fmt.Printf("\n---------- NOTIFICATION RESPONSE DEBUG ----------\n") + fmt.Printf("notificationID: %s\n", notificationID) + fmt.Printf("action: %s\n", action) + fmt.Printf("platformData: %+v\n", platformData) + fmt.Printf("target: %+v (signature: %s)\n", target, target.Signature()) + fmt.Printf("response: %+v (signature: %s)\n", notifierResponse, notifierResponse.Signature()) + fmt.Printf("----------------------------------------------\n") + response := NotificationResponse{ ID: notificationID, ActionIdentifier: action,