From 35bc96a81edba0b7a9bb720f7488a0aed3d51ad5 Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao Date: Fri, 13 Aug 2021 19:00:36 +0200 Subject: [PATCH] quickfix purge old contacts --- src/db/models/Contact.helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/models/Contact.helper.ts b/src/db/models/Contact.helper.ts index 1883585..857aef5 100644 --- a/src/db/models/Contact.helper.ts +++ b/src/db/models/Contact.helper.ts @@ -19,7 +19,7 @@ export async function purgeOldContacts(telegramID: TelegramID): Promise { if (!contact.createdAt) throw new Error("Creation time not set for contact."); const contactAge = currentTime - contact.createdAt.getTime(); - if (contactAge > 60 * 60 * 24 * 14 * 10000) { + if (contactAge > 60 * 60 * 24 * 14 * 1000) { oldContacts.push(contact); } });