Telegram team posts: disable link previews on payout/team-build notifications

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-02 05:12:40 -05:00
parent bf5e8bdee9
commit 8ea371dd09
+3 -1
View File
@@ -157,7 +157,9 @@ function submitRateLimited(ip) {
function sendTelegram(text, topicId, replyMarkup) { function sendTelegram(text, topicId, replyMarkup) {
const c = getConfig(); const c = getConfig();
if (!c.telegramBotToken || !c.telegramChatId) return; if (!c.telegramBotToken || !c.telegramChatId) return;
const payload = { chat_id: c.telegramChatId, text }; // 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: c.telegramChatId, text, disable_web_page_preview: true };
const thread = topicId != null ? topicId : c.telegramTopicId; const thread = topicId != null ? topicId : c.telegramTopicId;
if (thread && /^[0-9]+$/.test(String(thread))) payload.message_thread_id = Number(thread); if (thread && /^[0-9]+$/.test(String(thread))) payload.message_thread_id = Number(thread);
if (replyMarkup) payload.reply_markup = replyMarkup; if (replyMarkup) payload.reply_markup = replyMarkup;