From c91a530b7e3532a04a48fc96e3ed82663ed0dcbe Mon Sep 17 00:00:00 2001 From: martbost Date: Mon, 17 Aug 2026 07:40:02 -0500 Subject: [PATCH] Recruiting Telegram feed: add inline "Get Started" button to rmcircle.team MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sendTelegram() takes an optional reply_markup; the recruiting posts carry an inline URL button (🚀 Get Started — rmcircle.team) under every event, so the busy new-members feed converts attention into clicks to the home page. Co-Authored-By: Claude Opus 4.8 --- server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 18a757c..db3500b 100644 --- a/server.js +++ b/server.js @@ -92,12 +92,13 @@ function submitRateLimited(ip) { // Post to the team Telegram. topicId overrides the default team-build topic // (config.telegramTopicId) — used to fan the same event out to a second forum // topic (e.g. the recruiting/new-members topic) with different copy. -function sendTelegram(text, topicId) { +function sendTelegram(text, topicId, replyMarkup) { const c = getConfig(); if (!c.telegramBotToken || !c.telegramChatId) return; const payload = { chat_id: c.telegramChatId, text }; const thread = topicId != null ? topicId : c.telegramTopicId; if (thread && /^[0-9]+$/.test(String(thread))) payload.message_thread_id = Number(thread); + if (replyMarkup) payload.reply_markup = replyMarkup; fetch(`https://api.telegram.org/bot${c.telegramBotToken}/sendMessage`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) @@ -684,7 +685,7 @@ chain.startIndexer(evt=>{ sendTelegram(text); // recruiting-framed copy of the SAME event to the new-members topic // (social proof, CTA -> home). Fires only when a recruit topic is set. - if(c.telegramRecruitTopicId){ const rm=recruitMsg(evt); if(rm) sendTelegram(rm, c.telegramRecruitTopicId); } + if(c.telegramRecruitTopicId){ const rm=recruitMsg(evt); if(rm) sendTelegram(rm, c.telegramRecruitTopicId, {inline_keyboard:[[{text:'🚀 Get Started — rmcircle.team',url:'https://rmcircle.team/?utm_source=tg'}]]}); } // admin email alert — same team-gated events, so deep-leg action still surfaces if(c.teamAlertEmail){ const subj=evt.type==='registered'?`RM Circle team build: #${evt.id} registered under #${evt.referrerId}`