diff --git a/snapshot.js b/snapshot.js index 26520bc..54a9784 100644 --- a/snapshot.js +++ b/snapshot.js @@ -153,7 +153,9 @@ async function milestoneTick() { const sc = X.siteConfig(); if (!sc.telegramBotToken) return null; const st = state(); const done = st.milestones || {}; const count = await memberCount(); - const due = marksUpTo(count).filter(m => !done[m]); + // presence of the key is what counts, never its value: a mark recorded as 0 (or any other + // falsy stamp) must stay done, or the ladder back-posts a number the site passed long ago + const due = marksUpTo(count).filter(m => !Object.prototype.hasOwnProperty.call(done, m)); if (!due.length) return null; const mark = due[due.length - 1]; const text = composeMilestone(mark, await gather(), sc.telegramCtaUrl);