Skip to content

Commit bd857bc

Browse files
committed
clear notification queue when re-fetching
1 parent e5ca9c0 commit bd857bc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

backend/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
setApplicationInfo,
2727
submitApplicationInfo,
2828
} from "./routes/application_info";
29-
import {createEventPushSubscription, deleteEventPushSubscription, getEventSubscriptions} from "./routes/event_subscriptions"
29+
import { createEventPushSubscription, deleteEventPushSubscription, getEventSubscriptions } from "./routes/event_subscriptions"
3030
import { getMeetInfo, setMeetInfo } from "./routes/meet_info";
3131
import { getUsedMeals, setUsedMeals } from "./routes/used_meals";
3232
import { getWorkshopList, setWorkshopList } from "./routes/workshop_info";

backend/services/live_notifications.ts

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export default class LiveNotificationsService {
6666
const events = req.data.events;
6767
this.events = events;
6868

69+
// Clear the existing notification queue
70+
this.notificationQueue = [];
71+
6972
// Put all future events into the queue
7073
const futureEvents = events.filter(
7174
(evt) => new Date(evt.start_time) > new Date()

0 commit comments

Comments
 (0)