Browse Source

quickfix purge old contacts

development
Nareshkumar Rao 3 years ago
parent
commit
35bc96a81e
  1. 2
      src/db/models/Contact.helper.ts

2
src/db/models/Contact.helper.ts

@ -19,7 +19,7 @@ export async function purgeOldContacts(telegramID: TelegramID): Promise<void> {
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);
}
});

Loading…
Cancel
Save