~whereswaldon/gio-x

4b62720cb125da2edc3cf3cb4d05fb59e6778ed6 — Chris Waldon 6 months ago ca9a802 notify-no-crit
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 <christopher.waldon.dev@gmail.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M notify/macos/notify_macos.go
M notify/macos/notify_macos.go => notify/macos/notify_macos.go +1 -1
@@ 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;