diff --git a/src/index.ts b/src/index.ts index 0187397..c539a48 100644 --- a/src/index.ts +++ b/src/index.ts @@ -100,7 +100,7 @@ const runCron = async () => { } }); const expiryTime = Date.now() - (1000 * 60 * 15); // 15 Minutes - db.collection('alerts').deleteMany({ tgChatId: { '$exists': false }, timestamp: { '$lt': expiryTime } }); + db.collection('alerts').deleteMany({ alertProvider: 'tg', tgChatId: { '$exists': false }, timestamp: { '$lt': expiryTime } }); } catch (e) { sendLogsToDiscord(null, e); }