From 4b62720cb125da2edc3cf3cb4d05fb59e6778ed6 Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Tue, 1 Aug 2023 15:36:57 -0400 Subject: [PATCH] notify/macos: drop critical alert attribute This makes notify-generated notifications not request critical priority, as it both is disruptive to users (bypassing do not disturb) and requires special entitlements for your application. Fixes: https://todo.sr.ht/~eliasnaur/gio/515 Signed-off-by: Chris Waldon --- notify/macos/notify_macos.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notify/macos/notify_macos.go b/notify/macos/notify_macos.go index 0e5d677..35abfb8 100644 --- a/notify/macos/notify_macos.go +++ b/notify/macos/notify_macos.go @@ -86,7 +86,7 @@ notify(char *id, char *title, char *content, unsigned char *errorCode) { ret = req.identifier; [ret retain]; NSLog(@"Requesting authorization"); - [nc requestAuthorizationWithOptions: UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionCriticalAlert completionHandler: ^(BOOL granted, NSError *error){ + [nc requestAuthorizationWithOptions: UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert completionHandler: ^(BOOL granted, NSError *error){ NSLog(@"Granted = %s", granted?"true":"false"); NSLog(@"Error = %@", error); enabled = granted; -- 2.45.2