diff --git a/functions/src/notifications/sendGentleReminderCallable.ts b/functions/src/notifications/sendGentleReminderCallable.ts index 73eae984..c313b9fe 100644 --- a/functions/src/notifications/sendGentleReminderCallable.ts +++ b/functions/src/notifications/sendGentleReminderCallable.ts @@ -1,5 +1,6 @@ import * as functions from 'firebase-functions' import * as admin from 'firebase-admin' +import { pruneDeadTokens } from './pruneTokens' const GENTLE_REMINDER_MAX_PER_HOUR = 5 const GENTLE_REMINDER_WINDOW_MS = 60 * 60 * 1000 // 1 hour @@ -186,6 +187,8 @@ export const sendGentleReminderCallable = functions.https.onCall(async (_data, c ) } }) + + await pruneDeadTokens(db, partnerId, tokens, sendResults) } console.log(