diff --git a/src/services/NotificationService.ts b/src/services/NotificationService.ts index a1eb118..573e2fb 100644 --- a/src/services/NotificationService.ts +++ b/src/services/NotificationService.ts @@ -256,6 +256,22 @@ export class NotificationService { * @param deviceId */ public async getAllScheduledNotificationsForDevice(deviceId: string): Promise { - return []; + const scheduledNotifications: ScheduledNotificationData[] = []; + + for (const key of Object.keys(this.deviceIdsToDeliverTo)) { + if (this.deviceIdsToDeliverTo[key].has(deviceId)) { + const tupleKey = TupleKey.fromExistingStringKey(key); + const shuttleId = tupleKey.tuple[0] + const stopId = tupleKey.tuple[1]; + + scheduledNotifications.push({ + shuttleId, + stopId, + deviceId, + }); + } + } + + return scheduledNotifications; } }