add system id to the notification payload for good measure

This commit is contained in:
2025-04-22 11:15:35 -07:00
parent 1cb498b150
commit 95f2e6ec29
4 changed files with 10 additions and 5 deletions

View File

@@ -71,6 +71,7 @@ export class InterchangeSystem {
shuttleRepository,
notificationRepository,
new AppleNotificationSender(),
args.id,
);
notificationScheduler.startListeningForUpdates();
@@ -115,6 +116,7 @@ export class InterchangeSystem {
shuttleRepository,
notificationRepository,
new AppleNotificationSender(false),
args.id,
);
notificationScheduler.startListeningForUpdates();

View File

@@ -13,7 +13,8 @@ export class ETANotificationScheduler {
constructor(
private shuttleRepository: ShuttleGetterRepository,
private notificationRepository: NotificationRepository = new InMemoryNotificationRepository(),
private appleNotificationSender = new AppleNotificationSender()
private appleNotificationSender = new AppleNotificationSender(),
private interchangeSystemId: string,
) {
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this);
@@ -47,6 +48,7 @@ export class ETANotificationScheduler {
body: `Shuttle is approaching ${stop.name} in ${Math.ceil(eta.secondsRemaining / 60)} minutes.`,
customKeys: {
shuttleId,
systemId: this.interchangeSystemId,
},
}
return this.appleNotificationSender.sendNotificationImmediately(deviceId, notificationAlertArguments);