Recruiting Telegram feed: add inline "Get Started" button to rmcircle.team

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 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-08-17 07:40:02 -05:00
parent 0fff3c92e0
commit c91a530b7e
+3 -2
View File
@@ -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}`