From 7199adf20e0bfe25ddf6932828c2b59906068cb3 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Tue, 25 Mar 2025 16:20:55 -0700 Subject: [PATCH] play the default sound when the notification is sent --- src/notifications/senders/AppleNotificationSender.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/notifications/senders/AppleNotificationSender.ts b/src/notifications/senders/AppleNotificationSender.ts index 80c6f2a..d64df98 100644 --- a/src/notifications/senders/AppleNotificationSender.ts +++ b/src/notifications/senders/AppleNotificationSender.ts @@ -96,7 +96,7 @@ export class AppleNotificationSender { req.setEncoding('utf8'); await new Promise((resolve, reject) => { - req.on('response', (headers, flags) => { + req.on('response', (headers, _flags) => { if (headers[":status"] !== 200) { reject(`APNs request failed with status ${headers[":status"]}`); } @@ -106,6 +106,7 @@ export class AppleNotificationSender { req.write(JSON.stringify({ aps: { alert: notificationAlertArguments, + sound: "default" } })); req.end(); @@ -130,12 +131,11 @@ export class AppleNotificationSender { const path = "/3/device/" + deviceId; const fullUrl = hostToUse + path; - const constructedObject = { + return { fullUrl, host: hostToUse, path, - } - return constructedObject; + }; } }