From b3cd399e10f6cf216a474574d7465b4e1d563550 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 23 Apr 2025 11:54:32 -0700 Subject: [PATCH 1/2] fix custom keys so they're spread across payload correctly --- src/notifications/senders/AppleNotificationSender.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notifications/senders/AppleNotificationSender.ts b/src/notifications/senders/AppleNotificationSender.ts index 2f458af..4aac769 100644 --- a/src/notifications/senders/AppleNotificationSender.ts +++ b/src/notifications/senders/AppleNotificationSender.ts @@ -119,7 +119,7 @@ export class AppleNotificationSender { alert: notificationAlertArguments, sound: "default" }, - customKeys, + ...customKeys, }); req.write(payload); req.end(); From bf06c7ed3a48fe81465e1f7372b0cb25e5d3b002 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 23 Apr 2025 11:55:15 -0700 Subject: [PATCH 2/2] update custom keys passed through notification scheduler --- src/notifications/schedulers/ETANotificationScheduler.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/notifications/schedulers/ETANotificationScheduler.ts b/src/notifications/schedulers/ETANotificationScheduler.ts index b269982..328f36c 100644 --- a/src/notifications/schedulers/ETANotificationScheduler.ts +++ b/src/notifications/schedulers/ETANotificationScheduler.ts @@ -47,9 +47,11 @@ export class ETANotificationScheduler { title: "Shuttle is arriving", body: `Shuttle is approaching ${stop.name} in ${Math.ceil(eta.secondsRemaining / 60)} minutes.`, customKeys: { - shuttleId, - stopId, - systemId: this.interchangeSystemId, + shuttleEtaNotificationInfo: { + shuttleId, + stopId, + systemId: this.interchangeSystemId, + } }, } return this.appleNotificationSender.sendNotificationImmediately(deviceId, notificationAlertArguments);