From 5c34ab330573a8e857b5fcf77d391c9a5f0c6d5e Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 18 Sep 2026 12:50:28 -0500 Subject: [PATCH] Remove the duplicate-hunt instrumentation, keep the audit line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The verbose per-send logging did its job: it proved this process sends each payout once, which is what pointed the search away from the deployed app and at a second server running elsewhere with the same bot token. Dropping the text dump. Keeping one line per send with the message_id Telegram assigns — that is the line that made the second sender findable, and a payment feed is worth being able to audit. Confirmed fixed: the payout at 17:47 posted exactly once to each feed. Co-Authored-By: Claude Opus 5 (1M context) --- server.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/server.js b/server.js index 8f15fe5..0472895 100644 --- a/server.js +++ b/server.js @@ -216,13 +216,6 @@ function sendTelegramTo(chatId, text, topicId, replyMarkup, parseMode, dedupeKey console.warn('telegram duplicate suppressed:', dedupeKey, '->', String(chatId)); return; } - // TEMPORARY (2026-09-18): members are seeing payment lines twice. This process has a - // durable announce-once per on-chain event AND a send-level dedupe, and neither is firing, - // which means the second copy is not coming from here. Log every send with the instance id - // so "did WE send it twice, or is something else posting?" is answerable from the log - // instead of by deduction. Remove once the source is confirmed. - console.log('tg-send', TG_INSTANCE, 'chat=' + chatId, 'topic=' + (topicId || '-'), - JSON.stringify(String(text).replace(/\s+/g, ' ').slice(0, 70))); // No link previews: payout/team-build posts carry Polygonscan links, and the // preview card tripled the height of every message in the group. const payload = { chat_id: chatId, text, disable_web_page_preview: true }; @@ -236,9 +229,9 @@ function sendTelegramTo(chatId, text, topicId, replyMarkup, parseMode, dedupeKey }).then(async r=>{ const body = await r.json().catch(()=>null); if(!r.ok || !body || !body.ok) { console.error('telegram sendMessage status', r.status, JSON.stringify(body).slice(0,200)); return; } - // Log the id Telegram assigns. When a duplicate shows up in a feed, this says which of - // the two copies is ours — and therefore whether this process sent twice or something - // else with the same bot token posted the second one. (2026-09-18 duplicate hunt.) + // One concise line per send, kept deliberately: it is what identified a second sender + // posting into the same channel with the same bot token on 2026-09-18. A payment feed + // is worth being able to audit. console.log('tg-ok', TG_INSTANCE, 'chat=' + chatId, 'message_id=' + (body.result && body.result.message_id)); }) .catch(e=>console.error('telegram error', e.message));