mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
add optional dependency inject for apple notification sender
This commit is contained in:
@@ -15,14 +15,10 @@ export interface ScheduledNotificationData {
|
||||
export class ETANotificationScheduler {
|
||||
public readonly secondsThresholdForNotificationToFire = 180;
|
||||
|
||||
private appleNotificationSender = new AppleNotificationSender()
|
||||
|
||||
private _lastRefreshedTimeMs: number | undefined = undefined;
|
||||
get lastRefreshedTimeMs() {
|
||||
return this._lastRefreshedTimeMs;
|
||||
}
|
||||
|
||||
constructor(private repository: GetterRepository, private shouldActuallySendNotifications = true) {
|
||||
constructor(private repository: GetterRepository,
|
||||
private shouldActuallySendNotifications = true,
|
||||
private appleNotificationSender = new AppleNotificationSender()
|
||||
) {
|
||||
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
|
||||
this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this);
|
||||
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
|
||||
|
||||
Reference in New Issue
Block a user