This commit is contained in:
indifferentketchup
2026-04-07 09:29:24 -05:00
parent 8636cca52e
commit 56ba8e363a
4 changed files with 28 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ async function checkStaleSurge(client) {
const cutoff = new Date(Date.now() - CONFIG.SURGE_STALE_HOURS * 3600000);
const count = await Ticket.countDocuments({
status: 'open',
lastActivity: { $lte: cutoff }
lastActivity: { $lte: cutoff, $ne: null }
});
if (count >= CONFIG.SURGE_STALE_COUNT) {
setCooldown('surge:stale');
@@ -88,7 +88,7 @@ async function checkNeedsResponseSurge(client) {
const count = await Ticket.countDocuments({
status: 'open',
lastMessageAuthorIsStaff: false,
lastActivity: { $lte: cutoff }
lastActivity: { $lte: cutoff, $ne: null }
});
if (count >= CONFIG.SURGE_NEEDS_RESPONSE_COUNT) {
setCooldown('surge:needs_response');