Holding-tank arrivals post shows the running total too (Marty 2026-11-14: post those totals so people know who is waiting to be adopted): '(N waiting in total)' after the new names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 08:06:44 -06:00
parent d6fd0c8e04
commit ec09f2925e
+3 -2
View File
@@ -1215,12 +1215,13 @@ async function tankNotifyTick() {
// the first run of this rule: anyone who joined before it was already announced at sign-up.
const graceFrom = st.graceFrom || (st.graceFrom = st.last || Date.now());
const fresh = [];
for (const w of tank.openedSince(await tank.waiting(), since)) if ((w.joined || 0) > graceFrom && await marks.claim('tankopen:' + w.email + ':' + (w.joined || 0))) fresh.push(w);
const all = await tank.waiting(); // the running total goes in the post too (Marty 2026-11-14: "post those totals")
for (const w of tank.openedSince(all, since)) if ((w.joined || 0) > graceFrom && await marks.claim('tankopen:' + w.email + ':' + (w.joined || 0))) fresh.push(w);
st.last = Date.now(); fs.writeFileSync(f, JSON.stringify(st));
if (!fresh.length) return;
const named = fresh.filter(w => w.username).map(w => '@' + w.username);
const who = named.length ? ': ' + named.slice(0, 8).join(', ') + (named.length > 8 ? ' and ' + (named.length - 8) + ' more' : '') : '';
const text = '\u{1FAA3} <b>LinkSpin</b> \u00b7 ' + fresh.length + ' new member' + (fresh.length === 1 ? '' : 's') + ' waiting for a sponsor in the holding tank' + who
const text = '\u{1FAA3} <b>LinkSpin</b> \u00b7 ' + fresh.length + ' new member' + (fresh.length === 1 ? '' : 's') + ' waiting for a sponsor in the holding tank' + who + ' (' + tank.adoptableOf(all).length + ' waiting in total)'
+ '\nAdopt from Team \u203a Waiting on a wallet: <a href="' + SITE_URL + '/team">' + SITE_HOST + '/team</a>';
await telegramSend(sc.telegramEchoChatId, text, sc.telegramEchoTopicId);
}