fix binding errors with static method

This commit is contained in:
2025-02-03 23:25:53 -08:00
parent c593fe14e1
commit aff82a8185
2 changed files with 3 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
import { NotificationService } from './NotificationService';

View File

@@ -25,7 +25,6 @@ export class NotificationService {
this.reloadAPNsTokenIfTimePassed = this.reloadAPNsTokenIfTimePassed.bind(this);
this.lastReloadedTimeForAPNsIsTooRecent = this.lastReloadedTimeForAPNsIsTooRecent.bind(this);
this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this);
this.getAPNsFullUrlToUse = this.getAPNsFullUrlToUse.bind(this);
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold = this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold.bind(this);
this.scheduleNotification = this.scheduleNotification.bind(this);
@@ -75,7 +74,7 @@ export class NotificationService {
private async sendEtaNotificationImmediately({ deviceId, shuttleId, stopId }: ScheduledNotificationData): Promise<boolean> {
this.reloadAPNsTokenIfTimePassed();
const url = this.getAPNsFullUrlToUse(deviceId);
const url = NotificationService.getAPNsFullUrlToUse(deviceId);
const shuttle = await this.repository.getShuttleById(shuttleId);
const stop = await this.repository.getStopById(stopId);